D365 Retail

Field notes on Dynamics 365 Commerce & Retail

All articles
MPOSCRT

PostEndTransactionTrigger: The Trigger That May Not Trigger

4 December 20181 min readHitesh Manglani

Based on the 7.1 Retail SDK, but likely applicable to later releases unless this has since been fixed.

A customer reported several transactions as "missing," backed up with CCTV footage and a credit card slip. Digging into the server logs, the same transaction ID showed up across two separate transactions — the cart wasn't being cleared between them.

My customization needed to access cart information right after checkout, so the cart-clearing logic lived in PostEndTransactionTrigger.

Root cause

A support ticket with Microsoft turned up the actual cause: if the cashier exits MPOS without closing the Change Due dialog, PostEndTransactionTrigger doesn't execute at all.

Change Due dialog

Takeaway

If you rely on PostEndTransactionTrigger, keep the logic inside it non-critical. It may silently not run if the cashier exits MPOS before dismissing the Change Due dialog — as ours did, with a stale cart as the result.

More on this topic

Stuck on a D365 Commerce issue?

If you need hands-on help with MPOS, CRT extensions, or a Retail deployment, get in touch — I still build these things.

Talk to me