ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Codeunit 2000020 DomiciliationJnlManagement "CreateDomiciliations"

Open bartpattijn opened this issue 6 years ago • 4 comments

can we have an event in CU 2000020 DomiciliationManagement in function "CreateDomiciliations"

DomJnlLine.Copy(DomicJnlLine); DomJnlLine.SetRange("Journal Template Name", DomJnlLine."Journal Template Name"); DomJnlLine.SetRange("Journal Batch Name", DomJnlLine."Journal Batch Name"); if DomJnlLine."Bank Account No." <> '' then DomJnlLine.SetRange("Bank Account No.", DomJnlLine."Bank Account No."); if DomJnlLine."Posting Date" <> 0D then DomJnlLine.SetRange("Posting Date", DomJnlLine."Posting Date"); OnAfterSetFilters(var DomJnlLine); //new event DomJnlTemplate.Get(DomJnlLine."Journal Template Name"); REPORT.RunModal(REPORT::"File Domiciliations", true, false, DomJnlLine);

bartpattijn avatar Dec 02 '19 13:12 bartpattijn

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. We will update this issue with information about availability.

bc-ghost avatar Dec 23 '19 16:12 bc-ghost

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. We will update this issue with information about availability.

bc-ghost avatar Dec 27 '19 09:12 bc-ghost

This is not ok in BC15.4: the procedure is not an event:

[Scope('OnPrem')]
procedure ModifyPmtDiscDueDate(DomicJnlLine: Record "Domiciliation Journal Line")
var
    CustLedgEntry: Record "Cust. Ledger Entry";
begin
    with DomicJnlLine do begin
        CustLedgEntry.SetCurrentKey("Document No.");
        CustLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
        CustLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
        CustLedgEntry.SetRange("Customer No.", "Customer No.");
        if CustLedgEntry.FindLast then begin
            CustLedgEntry.Validate("Remaining Pmt. Disc. Possible", -"Pmt. Disc. Possible");
            CustLedgEntry.Validate("Pmt. Discount Date", "Posting Date");
            CustLedgEntry.Modify(true)
        end;
    end
end;

local procedure OnCreateDomiciliationsOnAfterSetFilters(var DomiciliationJournalLine: Record "Domiciliation Journal Line")
begin
end;

bartpattijn avatar Mar 13 '20 14:03 bartpattijn

this is just created as local function, so useless. this should be created as an event.

bartpattijn avatar Mar 13 '20 14:03 bartpattijn