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 Request] Codeunit 13 "Gen. Jnl.-Post Batch" - OnBeforeFindNextGLRegisterNo #27002

Open RZ440 opened 1 month ago

RZ440 commented 1 month ago

Describe the request

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

    local procedure FindNextGLRegisterNo()
    var
        IsHandled: Boolean;
    begin
        GLReg.LockTable();
        IsHandled := false;
        OnBeforeFindNextGLRegisterNo(GLReg, GLRegNo, IsHandled);
        if not IsHandled then
            GLRegNo := GLReg.GetLastEntryNo() + 1;
    end;
    [IntegrationEvent(false, false)]
    local procedure OnBeforeFindNextGLRegisterNo(var GLRegister: Record "G/L Register"; var GLRegNo: Integer; var IsHandled: Boolean)
    begin
    end;

Additional context

If several postings logically belong together we would like to use the same G/L Register as before instead of creating a new one. Internal work item: AB#545266