Thursday, July 12, 2018

Simple Dialog Box in Axapta 2012

The following example displays the dialog box and prints the value entered to the screen.

Code:
static void theAxapta_DialogBox(Args _args)
{
dialog              dialog;
dialogGroup    dialogGroup;
dialogField      dialogField;
;
dialog              = new Dialog("Simple Dialog");
dialogGroup    = dialog.addGroup("Customer");
dialogField      = dialog.addField(extendedTypeStr(custAccount));
if (dialog.run())
{
print dialogField.value();
pause;
}
}

Output:

















Note:

    1.   The dialog.run() method returns true if OK is clicked, and false if Cancel is     clicked.
    2.   Dialog Group is used to group dialog fields which are logically same.

No comments:

Post a Comment