ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Change Request] Codeunit 5632 - FA Jnl.-Post Line - OnBeforeFAJnlPostLine

Open Codey42 opened this issue 4 years ago • 1 comments

Dear ALAppExtensions team,

Through this issue we would like to request extending event publisher OnBeforeFAJnlPostLine in Codeunit 5632 FA Jnl.-Post Line to the following signature:

[IntegrationEvent(false, false)]
local procedure OnBeforeFAJnlPostLine(var FAJournalLine: Record "FA Journal Line";
                                      var FAInsertLedgerEntry: Codeunit "FA Insert Ledger Entry";
                                      CheckLine: Boolean;
                                      var IsHandled: Boolean)
begin
end;

with VAR parameters FAJournalLine and FAInsertLedgerEntry (latter is required due to the methods FindFirstGLAcc and GetNextGLAcc). which would be called as follows from FAJnlPostLine:

procedure FAJnlPostLine(FAJnlLine: Record "FA Journal Line"; CheckLine: Boolean)
var
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeFAJnlPostLine(FAJnlLine, FAInsertLedgEntry, CheckLine, IsHandled);
    if IsHandled then
        exit;

    FAInsertLedgEntry.SetGLRegisterNo(0);
    with FAJnlLine do begin
        if "FA No." = '' then
            exit;
        if "Posting Date" = 0D then
            "Posting Date" := "FA Posting Date";
        if CheckLine then
            FAJnlCheckLine.CheckFAJnlLine(FAJnlLine);
        DuplicateDeprBook.DuplicateFAJnlLine(FAJnlLine);

Codey42 avatar Feb 03 '22 11:02 Codey42

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.

JesperSchulz avatar Feb 09 '22 07:02 JesperSchulz