Home > Ax Technical > Creating custom Picking list in Dynamics – Part II

Creating custom Picking list in Dynamics – Part II

This is in continuation to the article that i posted on creating custom Picking List (click to view)
 The last aritcle was about using the Global::pickList forms and creating a simple custom Pick List form which takes map as an input
The custom Picklist’s discussed here provide you more options like
   >Specifying the image to be used
   >Display either a Map or container in the list
There are two ways of creating a complete custom Pick List
 ‘SysPick’ form can be used to create custom list with the choice of taking input as Map and displaying standard images like tables, class, fields, You can invoke the "SysPick" form via the classfactory.
                      args = new Args(formstr(SysPick));
                      args.parm(‘ 2’);
                      map = Map::create(SysPickList::fillFieldsMap(int2str(tablenum(custTable))));
                      formRun = classfactory.formRunClass(args);
                      if (formRun.selection())
                                 //TODO someAction
        > The argument for the "args.parm(‘ 2’)" method decides the image type to be displayed.
                      – The argument value is to be based on the following EnumType "SysPickListType"
                         but has to be passed as a string and a blank space before the value is mandatory
        > SysPickList class has some static function that gives you a map of several repeated lists
            like fields, table, userdomain, class etc. you can use it to get the list to be passed as shown in the code
            map = Map::create(SysPickList::fillFieldsMap(int2str(tablenum(TestAdo))));
The other form is "PickList", this accepts any image for display and requires the list input as a container. The follwoing code demonstrates the way using it.
                            Object formRun;
                            formRun = classfactory.createPicklist();
                            formRun.choices([‘option1’, ‘option2’, ‘option3’], #ImageArrowUp);
                            formRun.caption("Testing Picklist");
                           if (formRun.choice())
                                  //TODO someAction
would result in  some thing like this 
 ……………………… happy picking !!!!!
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google photo

You are commenting using your Google 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

%d bloggers like this: