[Paramenter Request] Codeunit 22 Item Jnl.-Post Line - OnBeforePostInventoryToGL
Hi, Could you please add "IsHandled" parameter to existing event OnBeforePostInventoryToGL in CU22. We are using our own procedures do post inventory to GL that is why we need to call a different CU. Hooking on events in existing CU5802 is not an option unfortunately.
local procedure PostInventoryToGL(var ValueEntry: Record "Value Entry") begin with ValueEntry do begin if CalledFromAdjustment and not PostToGL then exit;
OLD START OnBeforePostInventoryToGL(ValueEntry); OLD END
NEW START IsHandled := false; OnBeforePostInventoryToGL(ValueEntry,IsHandled); if IsHandled then exit; NEW END
InventoryPostingToGL.SetRunOnlyCheck(true, not PostToGL, false);
PostInvtBuffer(ValueEntry);
. . .
old event: [IntegrationEvent(false, false)] local procedure OnBeforePostInventoryToGL(var ValueEntry: Record "Value Entry") begin end;
new event: [IntegrationEvent(false, false)] local procedure OnBeforePostInventoryToGL(var ValueEntry: Record "Value Entry"; var IsHandled: Boolean) begin end;
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. We will update this issue with information about availability.