Sometimes you want your user to select a sertain table/field/… When you want to program this selection all by yourself you have to make a table, override the lookup()-method, …
There is also a easy way to do this. You can use the pic**** methodes in the Global class:
pickclasses
pickdatamethord...etc
How do you use these classes (you can find this example in \Forms\DocuOptionTable\Designs\Design\[Tab:TableTab]\[TabPage:Overview]\[Grid:TableOverviewGrid]\StringEdit:DocuTableName\Methods\lookup):
void lookup()
{
tableId id;
;
id = pickTable();
if (! id)
return;
docuTable.DocuTableId = id;
docuTable_ds.refresh();
}
The result:
Table : Field:
When you want to create you own customized pick-dialog you can by entering the following code:
static void testPickList(Args _args)
{
Object formRun;
container con;
;
formRun = classfactory.createPicklist();
formRun.init();
//fill container con
formRun.choices(con); // you can add a secundary parameter wth the imiges
formRun.caption("TEST"); // Make label
formRun.run();
formRun.wait();
if (formRun.choice())
{
print formRun.choice();
}
pause;
}
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
Combo boxes in Dialogs are added by adding a DialogField object with the type of an enum. The enum is then controlling what items you can pi...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
No comments:
Post a Comment