ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 81 "Gen. Journal Line" - OnExportPaymentFileOnBeforeCheckDocNoOnLines

Open MatjazSega opened this issue 4 years ago • 2 comments

Hello!

We would need the following event in Gen. Journal Line table:

table 81 "Gen. Journal Line"
{
...
    procedure ExportPaymentFile()
    var
        BankAcc: Record "Bank Account";
        ConfirmManagement: Codeunit "Confirm Management";
        // NEW VARIABLES >>>
        IsHandled: Boolean;
        // NEW VARIABLES <<<
    begin
        if not FindSet then
            Error(NothingToExportErr);
        SetRange("Journal Template Name", "Journal Template Name");
        SetRange("Journal Batch Name", "Journal Batch Name");
        TestField("Check Printed", false);

        // NEW CODE >>>
        OnExportPaymentFileOnBeforeCheckDocNoOnLines(Rec, IsHandled);
        if not IsHandled then
        // NEW CODE <<<
            CheckDocNoOnLines;
        if IsExportedToPaymentFile then
            if not ConfirmManagement.GetResponseOrDefault(ExportAgainQst, true) then
                exit;

        OnExportPaymentFileOnBeforeRunExport(Rec);
        BankAcc.Get("Bal. Account No.");
        if BankAcc.GetPaymentExportCodeunitID > 0 then
            CODEUNIT.Run(BankAcc.GetPaymentExportCodeunitID, Rec)
        else
            CODEUNIT.Run(CODEUNIT::"Exp. Launcher Gen. Jnl.", Rec);
        OnExportPaymentFileOnAfterRunExport(Rec);
    end;
...

    // NEW EVENT >>>
    [IntegrationEvent(false, false)]
    local procedure OnExportPaymentFileOnBeforeCheckDocNoOnLines(GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)
    begin
    end;
    // NEW EVENT <<<
}

Thanks in advance!

MatjazSega avatar Apr 05 '22 13:04 MatjazSega

This will be OnBeforeCheckDocNoOnLines inside CheckDocNoOnLines instead

Stepanenko-Vadim avatar Apr 12 '22 16:04 Stepanenko-Vadim

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 Apr 14 '22 09:04 JesperSchulz