Announcements
I added an extension request to be able to add the salesID/Sales Quotation Id to the ChangeDue dialog in POS.
Microsoft came back with the following:
***
The change due dialog is overridable, you can show custom information before the change due dialog, override show dialog for sales id and then call the base request to show change due or combine the custom information and change due in the same custom dialog.
***
How is the ChangeDue dialog overridable? If I look in the Developer Tolls when running in Chrome, I see it is calling CashbackDialog and it is called ChangeDialog.
Looking in Pos.Controls I see the content folder paths:
name: "CashbackDialog" with path "Controls > Dialogs > Payments",
name: "ChangeDueDialog" with path "Controls > Dialogs > Cart",
name: "ChangeDialog" with path "Controls > Dialogs > Cart",
The title label on the dialog I'm presented with is Change Due (string_1816). So I assume I need to change the ChangeDueDialog.
However when I usually add columns to a view, I get the TS-file from SampleExtensions for those views that is extensible.
So how can I overwrite the ChangeDue dialog or the CashBack dialog if I don't have its HTML or its TS-file?
The only things I have to my disposal that I can see is the ShowChangeDueClientRequest/ShowChangeDueClientResponse and I tried it to add a dialog to display the salesID / Sales quotation Id. However POS is not very clear with its call to custom on the ShowChangeDueClientRequest/response and the PostCartCheckoutTrigger. we have custom on the latter as well. It looks like it is first running the custom on ShowChangeDueclientRequest/Response, then PostCartCheckoutTrigger and then the actual dialog for the ShowchangeDueClientRequest/Response. Our custom in PostCartCheckoutTrigger has prompts as well, so there is now mutliple dialogs popping up.
We just want to display on the changedue dialog the salesID too. So how can I accomplish that because Microsoft's reply just doesn't make sense
Hi Retha,
I will leave this question to community as it's about how-to customize.
Thanks,
Juliet Zhu
The first suggestion of Microsoft is to extend the handler that is already available. That is what I did before logging the extensibility request. However it didn't call it always in the same sequence. Adding a totally new custom change due dialog is out of the question because that defeats the purpose of extensibility and we loose out of future upgrade enhancements of the change due dialog.
So I stepped through the code again and discovered the possible reason for the ShowChangeDueClientRequestHandler not being called always in the same sequence is because the PostCartCheckoutTrigger is run before the call to the show change due dialog. And we have custom in the PostCartCheckoutTrigger that is run in ASync mode. the latter has the effect that it will fire the custom off, and then just continue on to the show change due dialog instead of waiting for the custom to finish. some of the custom presented the user with a message or some prompt for a question. This is what causes the custom on the ShowChangeDueClientRequestHandler to not always show its message in the same sequence consistently.
so we are changing PostcartCheckoutTrigger to run everything in Sync mode to force it to finish before moving on to the Show change due dialog and its custom message.
André Arnaud de Cal...
293,289
Super User 2025 Season 1
Martin Dráb
232,068
Most Valuable Professional
nmaenpaa
101,156
Moderator