I'm trying to create a yes/no Box to appear in Microsoft Dynamics AX.
When yes is clicked, the process proceeds and when no is selected the process is cancelled. What would the code be?
I'm trying to create a yes/no Box to appear in Microsoft Dynamics AX.
When yes is clicked, the process proceeds and when no is selected the process is cancelled. What would the code be?
if (Box::yesNo("Do you want to continue?", DialogButton::No) == DialogButton::Yes)
{
info("We have clicked yes");
}
else
{
info("We have clicked no");
}
Most likely a box is not the correct way to go.
Take a look on the RunBase Framework, you will find hundreds of examples on its use in the standard code base.
The dialog is handled in dialog
method and will default to an OK/Cancel dialog, if not provided. The run
method contains the processing.