ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] table 5601 "FA Ledger Entry" - OnBeforeMoveToGenJnlLine

Open ReneZiel opened this issue 3 years ago • 3 comments

Hello, can you please add a new Event OnBeforeMoveToGenJnlLine in table 5601 "FA Ledger Entry" ?

    procedure MoveToGenJnl(var GenJnlLine: Record "Gen. Journal Line")
    var
        IsHandled: Boolean;
    begin
        NextLineNo := GenJnlLine."Line No.";
        GenJnlLine."Line No." := 0;
        GenJnlLine.Init();
        OnBeforeMoveToGenJnlLine(GenJnlLine, Rec, IsHandled);
        if IsHandled then
            exit;
        FAJnlSetup.SetGenJnlTrailCodes(GenJnlLine);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeMoveToGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var FALedgerEntry: Record "FA Ledger Entry"; var IsHandled: Boolean)
    begin
    end;

ReneZiel avatar May 15 '23 05:05 ReneZiel

What is the reason why you need a pubsliher after GenJnlLine.Init()? Isn't it better to have it an begining of the MoveToGenJnl ptocedure?

Please give us more information about scenario that you want to cover. Thanks

tomasevics avatar May 16 '23 08:05 tomasevics

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: 10816.

JesperSchulz avatar May 16 '23 15:05 JesperSchulz

What is the reason why you need a pubsliher after GenJnlLine.Init()? Isn't it better to have it an begining of the MoveToGenJnl ptocedure?

Please give us more information about scenario that you want to cover. Thanks

We need the Events after the Init because we set fields for further control.

ReneZiel avatar May 17 '23 06:05 ReneZiel