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;
}

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...