ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

IsHandled conflict

Open DanielSeiler opened this issue 3 years ago • 1 comments

In the codeunit DImensionManagement in procedure CheckDimValuePosting there is a conflict between two IsHandled variables.

After the first ishandled is set to true by an extension, the variable is used again in a different context. This causes the second ishandled to generate a false return value in the procedure.

Line 391 - The Event returns an Ishandled = true 'IsHandled := false; OnCheckDimValuePostingOnBeforeLogErrors(TempDefaultDim, DimSetEntry, LastErrorMessage, ErrorMessageMgt, isHandled);'

Line 422 - IsHandled is still true, so the exit returns mistakenly IsChecked=false ' OnCheckDimValuePostingOnBeforeExit(TableID, No, DimSetID, LastErrorMessage, ErrorMessageMgt, IsChecked, IsHandled); if IsHandled then exit(IsChecked);'

The last IsHandled Variable need to be set to False again, before OnCheckDimValuePostingOnBeforeExit.

DanielSeiler avatar Sep 20 '23 14:09 DanielSeiler

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 12672.

JesperSchulz avatar Oct 03 '23 08:10 JesperSchulz