Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event publisher to codeunit 10637 "Import CAMT054" #27823

Open
JonFjolnirAlbertsson opened this issue Dec 16, 2024 · 0 comments
Open

Add event publisher to codeunit 10637 "Import CAMT054" #27823

JonFjolnirAlbertsson opened this issue Dec 16, 2024 · 0 comments
Labels
event-request Request for adding an event Finance GitHub request for Finance area

Comments

@JonFjolnirAlbertsson
Copy link

JonFjolnirAlbertsson commented Dec 16, 2024

Describe the request

Add event publisher to codeunit 10637 "Import CAMT054" and the procedure HandleTransaction.

 procedure HandleTransaction(XmlNodeTransactionEntry: XmlNode)
    var
        WaitingJournal: Record "Waiting Journal";
        AmtDtlsGenJournalLine: Record "Gen. Journal Line";
        OriginalMsgId: Text;
        OriginalPmtInfId: Text;
        OriginalEndToEndId: Text;
        TransactionStatus: Text;
        IsHandled: Boolean;
    begin
        GetTransactionInfo(
          XmlNodeTransactionEntry, OriginalMsgId, OriginalPmtInfId, OriginalEndToEndId, TransactionStatus);
        WaitingJournal.Reset();
        WaitingJournal.SetFilter("SEPA Msg. ID", OriginalMsgId);
        WaitingJournal.SetFilter("SEPA Payment Inf ID", OriginalPmtInfId);
        WaitingJournal.SetFilter("SEPA End To End ID", OriginalEndToEndId);
        OnSetWaitingJournalFiltersOnBeforeWaitingJournalFindFirst(WaitingJournal, XmlNodeTransactionEntry, OriginalMsgId, OriginalPmtInfId, OriginalEndToEndId, TransactionStatus, IsHandled);
        if IsHandled then
            exit;

...

    [IntegrationEvent(false, false)]
    local procedure OnSetWaitingJournalFiltersOnBeforeWaitingJournalFindFirst(var WaitingJournal: Record "Waiting Journal"; var XmlNodeTransactionEntry: XmlNode; var OriginalMsgId: Text; var OriginalPmtInfId: Text; var OriginalEndToEndId: Text; var TransactionStatus: Text; var IsHandled: Boolean)
    begin
    end;

Additional context

This is neede to be able to handle transaction types other than payment to vendor from the bank. The customer does not want to import all the return transaction types from the bank, they only want to import the vendor payments.
Internal work item: AB#561099

@haoranpb haoranpb added event-request Request for adding an event Finance GitHub request for Finance area labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event Finance GitHub request for Finance area
Projects
None yet
Development

No branches or pull requests

2 participants