AX – D365 – Add a popup simple dialog form into a a Runbase Form

Suppose you have a Runbase dialog but before do something you want to ask user if he’s really sure he want to proceed with the elaboration.

After clicking OK a popup dialog form opens and asks the user if he wants to proceed

If ho click OK the elaboration starts, otherwise if he clicks on Cancel the focus must return to the Runbase form.

Create “openParmsDialog” new method.

This method opens the new dialog form

public boolean openParmsDialog()

{

   boolean                 ret = true;

   Dialog                  dialog;



       dialog = new Dialog("Override previos period?");

        dialog.run();

       if (dialog.closedOk())

       {

           ret = true;

       }

       else

       {

           ret = false;

       }

   return ret;

}

Now put this code into validate method

public boolean validate(Object _calledFrom = null)
{
   boolean ret = super();
   if (ret)
   {
       ret = this.openParmsDialog();
   }
 
   return ret;
}

Leave a comment