microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
770 stars 610 forks source link

[Event Change Request] Codeunit 13 "Gen. Jnl.-Post Batch" – OnBeforePostGenJnlLine #27008

Open RZ440 opened 1 month ago

RZ440 commented 1 month ago

Describe the request

Hello, can you please add ???GLRegNo??? to the event OnBeforePostGenJnlLine in codeunit 13 "Gen. Jnl.-Post Batch"?

    local procedure PostGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; CurrentICPartner: Code[20]; ICTransactionNo: Integer) Result: Boolean
.
.
.
        UpdateIncomingDocument(GenJnlLine5);
        UpdateDimBalBatchName(GenJnlLine5);
        OnBeforePostGenJnlLine(GenJnlLine5, SuppressCommit, IsPosted, GenJnlPostLine, GenJournalLine, GLRegNo);
        if not IsPosted then begin
            GenJnlPostLine.RunWithoutCheck(GenJnlLine5);
            InsertPostedGenJnlLine(GenJournalLine);
            RemoveRecordLink(GenJournalLine);
        end;
    [IntegrationEvent(true, false)]
    local procedure OnBeforePostGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; CommitIsSuppressed: Boolean; var Posted: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var PostingGenJournalLine: Record "Gen. Journal Line"; GLRegNo: Integer)
    begin
    end;

Additional context

We would like to add own entries to the G/L Register. Internal work item: AB#545258