[Event Request] Table 5876 - Phys. Invt. Order Line - OnAfterInitItemJnlLine
Hi AL-Team, can you please add the following Publisher in function CalcCosts?
procedure CalcCosts()
var
ItemJnlLine: Record "Item Journal Line";
begin
if EmptyLine then
exit;
TestField("Item No.");
TestStatusOpen;
TestField("Qty. Exp. Calculated", true);
TestField("On Recording Lines", true);
GetPhysInvtOrderHeader;
ItemJnlLine.Init;
// NEW >>>>
OnAfterInitItemJnlLine(Rec, ItemJnlLine);
// NEW <<<
....
[IntegrationEvent(false, false)]
local procedure OnAfterInitItemJnlLine(var Rec: Record "Phys. Invt. Order Line"; var ItemJnlLine: Record "Item Journal Line")
begin
end;
This event cannot work as variable ItemJnlLine will be initialized after event. Please rework you ask.
Hi, because I only want to set a global variable in the subscriber, the publisher would be fine for me. But I agree with you that the publisher would make more sense after the Init. I'm changing my request.
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.
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.