microsoft / ALAppExtensions

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

[Event Request] Codeunit 13 "Gen. Jnl.-Post Batch" - OnProcessLinesOnBeforeFindNextGLRegisterNo #26995

Closed RZ440 closed 6 days ago

RZ440 commented 2 months ago

Describe the request

Hello, can you please add a new event OnProcessLinesOnBeforeFindNextGLRegisterNo in codeunit 13 "Gen. Jnl.-Post Batch"?

local procedure ProcessLines(var GenJnlLine: Record "Gen. Journal Line")
.
.
.
        if GenJnlTemplate.Type = GenJnlTemplate.Type::Intercompany then
            CheckICDocument(TempGenJnlLine);

        ProcessBalanceOfLines(GenJnlLine, GenJnlLineVATInfoSource, VATInfoSourceLineIsInserted, LastLineNo, CurrentICPartner);

       OnProcessLinesOnBeforeFindNextGLRegisterNo(GenJnlLine, GenJnlBatch);

        // Find next register no.
        GLEntry.LockTable();
        FindNextGLRegisterNo();

        // Post lines
    [IntegrationEvent(false, false)]
    local procedure OnProcessLinesOnBeforeFindNextGLRegisterNo(GenJournalLine: Record "Gen. Journal Line"; GenJournalBatch: Record "Gen. Journal Batch")
    begin
    end;

Additional context

We would like to perform some preparative actions after all the checks and before posting. Internal work item: AB#545274

mildddd commented 6 days ago

Hi @RZ440,

Please, use the existing event OnAfterProcessBalanceOfLines. There is no need for additional events.

JesperSchulz commented 4 days ago

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