Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Unanswered

How to customize the ChangeDue dialog

Posted on by 1,433

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

  • Juliet Zhu Profile Picture
    Juliet Zhu on at
    RE: How to customize the ChangeDue dialog

    Hi Retha,

    I will leave this question to community as it's about how-to customize.

    Thanks,

    Juliet Zhu

  • Retha Profile Picture
    Retha 1,433 on at
    RE: How to customize the ChangeDue dialog

    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.

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans