How can you create a simple dialog box in Dynamics AX?

James Moore picture James Moore · Dec 7, 2010 · Viewed 80.2k times · Source

How can you create a simple dialog box in Dynamics ax?

Answer

James Moore picture James Moore · Dec 7, 2010
static void DialogSampleCode(Args _args)
{
    Dialog      dialog;
    DialogField field;
    ;
    dialog = new Dialog("My Dialog");
    dialog.addText("Select your favorite customer:");
    field = dialog.addField(typeid(CustAccount));

    dialog.run();
    if (dialog.closedOk())
    {
        info(field.value());
    }
}