D365FO – X++ – How can you create a simple dialog box in Dynamics AX?

static void DialogSampleCode(Args _args)

{

    Dialog      dialog;

    DialogField field;

    ;

    dialog = new Dialog(“My Dialog”);

    dialog.addText(“Select your favorite customer:”);

    field = dialog.addField(extendedTypeStr(CustAccount));

    dialog.run();

    if (dialog.closedOk())

    {

        info(field.value());

    }

}

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 )

Connecting to %s