This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
The following code opens form VendTable in grid and modifies the query of the form. In the example three specific vendors should be shown.
{
Args args;
FormRun fr;
QueryBuildDataSource qbds;
FormDataSource fds;
QueryBuildRange qbr;
args = new Args(formStr(VendTable));
args.caller(null);
args.menuItemType(MenuItemType::Display);
args.menuItemName(menuitemDisplayStr(VendTable));
args.formViewOption(FormViewOption::Grid);
fr = classfactory.formRunClass(args);
fr.init();
fds = fr.dataSource();
qbds = fds.queryBuildDataSource();
qbds.addRange(fieldNum(VendTable, RecId)).value(queryValue(22565421239));
qbds.addRange(fieldNum(VendTable, RecId)).value(queryValue(22565421240));
qbds.addRange(fieldNum(VendTable, RecId)).value(queryValue(22565421714));
fr.run();
fr.detach();
}
The form opened by above job may look similar to the following screenshot: