Monday, November 26, 2012

Displaying a list of custom options


1. In the AOT, create a new job named PickList with the following code:
static void PickList(Args _args)
{
    Map choices;
    str ret;
    choices = new Map(Types::Integer, Types::String);
    choices.insert(1, "Axapta 3.0");
    choices.insert(2, "Dynamics AX 4.0");
    choices.insert(3, "Dynamics AX 2009");
    choices.insert(4, "Dynamics AX 2012");
    ret = pickList(choices, "", "Choose version");
   
    if (ret)
    {
        info(strFmt("You've selected option No. %1", ret));
    }
}


2. Run the job to view the results:


3. Double-click on one of the options to show the selected option in the Infolog:



No comments: