Creating a Custom Display List –
When you open SysTableForm directly you would get to see a Small List form getting displayed which will populate all the available table names in Axapta (see Fig one below), once you select your choice the flow further continues, this article would delve in detail about using those inbuilt list or creating such a custom list in Ax applications.
Ax Provides the following inbuilt list
These list can be found under Global class prefixed with Pick, the return type of these functions depend on the type of list you choose to work with. Say for example the following code would create a new instance of the table choose by the user, based on the id of the table returned by PickTable() method.
i = Global::pickTable();
//make sure you perform this check to avoid stack trace error
print new SysDictTable(i).name();
Instead if you want to create a custom list, then all you need is a map where you need to add all the values that you want to appear on the list and then pass the map to the function, which would deliver you the custom list, something as seen below……
Map map = new Map(Types::String, Types::String);
//The Value is displayed in the List and the Key corresponding to is returned,
//make sure your values are also unique so that they don’t confuse the user
print pickList(map, ‘CustomList’, ‘Items’);
………………………….. heee heee