web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

How to add warning messages to the newly popup dialog?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hi experts,
Happy new year!
 
Here I get a new question when develop with AX.
When we select a record from the form, and click a menu item, this will trigger a RunBase class to open a new dialog.
The question is that, I want to do some check and add some warning message when the dialog shows.
 
Currently, I tried several methods, but the warning messages always shows in the original form, but not the dialog.
 
Is there any way I can add the messages to the dialog once it shows?
Can I just hook the open of dialog and write my logic? (How to hook?)
 
Thanks a lot.
 
I have the same question (0)
  • Martin Dráb Profile Picture
    239,449 Most Valuable Professional on at
    Please tell us more about your requirements.
     
    Are you saying that you want to run some validations when opening the dialog form (not when the dialog is being confirmed by clicking OK button) and display some information directly in the dialog form?
  • Suggested answer
    Komi Siabi Profile Picture
    13,228 Most Valuable Professional on at
    I am guessing you want a message displayed in a box; something like this..
    You should use the Box::yesNo method.
     
     
     
     
  • Kai Cheng Profile Picture
    Microsoft Employee on at
    Hi Komi and Martin, thanks for your response and inputs.
    Your insights are valuable.
     
    Here I want to give an example to explain my problems.
    After we create a new sales line, we can create a new transfer order for the sales line. Just go to the sales line > Product and supply > New Transfer order
    This will generate a popup dialog to create the new transfer order like below. (This menu item action refers to class InventTransferOrderCreateFromSalesLine)
     
    Currently, standard code allows users to create multiple transfer orders for a single sales line.
    What I want to do is to add a check here to inform user that an existing transfer order is created for the selected sales line when the dialog popup.
    So that is the question, can I add a pre-check and show the warnings in the popup dialog? Thanks.
     
  • Martin Dráb Profile Picture
    239,449 Most Valuable Professional on at
    Do I understand that you just want to show the warning but allow users to create a transfer order regardless of the warning?
     
    Why exactly the normal way, using warning() function, doesn't work for you?
  • Kai Cheng Profile Picture
    Microsoft Employee on at
    Yes, that is correct, I just want to inform user, don't want to prevent them from creating a new transfer order.
     
    Actually, I tried to add warning(Not checkFailed) in validate(), dialog(), etc. method in class InventTransferOrderCreateFromSalesLine.
    But all of them will show the warning messages in the original sales order form, not the popup dialog.
    I think this is not showy enough, so I prefer to show the warning in the dialog.
    Any idea will be appreciated? Thanks.
  • Suggested answer
    Martin Dráb Profile Picture
    239,449 Most Valuable Professional on at
    The message pane is indeed on the top of the app; it's not a part of individual forms. I recommend respecting how F&O UI works, rather than designing a unique solution for a single form. Note that you can use the Box API if you want to make the message very visible.
     
    If you insist on showing something in the dialog form, you we'll need to add a static text control (or something) there.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 159 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 126 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans