ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 5876 - Phys. Invt. Order Line - OnAfterInitItemJnlLine

Open MattiLE opened this issue 7 years ago • 4 comments

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;

MattiLE avatar Nov 12 '19 11:11 MattiLE

This event cannot work as variable ItemJnlLine will be initialized after event. Please rework you ask.

AlexanderYakunin avatar Nov 25 '19 12:11 AlexanderYakunin

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.

MattiLE avatar Nov 25 '19 13:11 MattiLE

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.

bc-ghost avatar Nov 29 '19 11:11 bc-ghost

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.

bc-ghost avatar Dec 13 '19 13:12 bc-ghost