Get dialog box of “YES or No” for any operation by User in Ax

HI,

While any operation performing by user, there are cases like need to take the confirmation  from user to perform the operation. In these cases we can use “DialogButton” for the user interaction no say “Yes/No” to execute the operation.

Below is the sample code:

     DialogButton                            diagBut;   

    str strMessage = “This operation should perform in JANUARY month only, still if you                                    want to continue”;

    str strTitle = “Title”;

   diagBut = Box::yesNoCancel(

        strMessage,

        DialogButton::No, // Initial focus is on the No button.

        strTitle);

      if (diagBut == DialogButton::No)

    {

        info(“Operation stoped.”);

    }

    else if(diagBut == DialogButton::Yes)

    {  

                Info(“button click code here”);

     }

  Else

  {     

         Info(“canceled”);

  }

For more information refer the below link:

http://msdn.microsoft.com/en-us/library/aa860308.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s