We’re integrating with a bank (let’s call it “ABC Bank”) in D365 Finance and Operations. When payment files are sent via ER from the Vendor Payment Journal using the "Generate Payments" button, the bank responds with two acknowledgment files – ACK1 and ACK2.
The bank uses the same status code (ACCP) in both ACK1 and ACK2, even though ACK2 can later contain a rejection (RJCT).
ACCP
RJCT
In our setup, we use the Return format status mapping table to map these bank codes to internal statuses.
When ACK1 arrives with ACCP, the system immediately updates the Vendor Payment Journal Line status to Approved.
Because the line is already marked as Approved, ACK2 (even if it has RJCT) doesn't change the status to Rejected, which leads to an incorrect status being displayed in the system.
The VendorPaymentJournalLineEntity and VendorPaymentJournalLinePaymentStatus entities are involved.
VendorPaymentJournalLineEntity
VendorPaymentJournalLinePaymentStatus
I traced the Return format status mapping, but couldn't find a direct reference or logic in the code where the status update actually happens or where it checks if an update should occur based on new values.
Return format status mapping
Is there a technical or functional way to handle this scenario better?
Can we somehow delay the status update until both ACKs are received or introduce logic to allow override if a RJCT is received later?
Where exactly is the status being updated from the return file, since it's not clearly tied to the "Return format status mapping" directly?
Any guidance, workaround, or experience with similar cases would be highly appreciated!
Thanks in advance,
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,100
André Arnaud de Cal... 890 Super User 2025 Season 2
Sohaib Cheema 633 User Group Leader