0

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?

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Dresus
  • 1
  • 1
  • 1
  • 1
    Possible duplicate of [How can you create a simple dialog box in Dynamics AX?](http://stackoverflow.com/questions/4379714/how-can-you-create-a-simple-dialog-box-in-dynamics-ax) – FH-Inway Mar 21 '17 at 16:50

2 Answers2

2
if (Box::yesNo("Do you want to continue?", DialogButton::No) == DialogButton::Yes)
{
    info("We have clicked yes");
}
else
{
    info("We have clicked no");
}
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
0

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.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50