Simple Lookup X++ Finance & Operation Dynamics AX
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(MZNUKGradeEntitlementTable), _formControl);
sysTableLookup.addLookupField(fieldNum(MZNUKGradeEntitlementTable, Entitlement));
sysTableLookup.addLookupField(fieldNum(MZNUKGradeEntitlementTable, Grade));
queryBuildDataSource = query.addDataSource(tableNum(MZNUKGradeEntitlementTable));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(MZNUKGradeEntitlementTable,grade));
queryBuildRange.value(SysQuery::value(MZNUKCustomerGradeEntitlementLines.Grade));
queryBuildRange.status(RangeStatus::Locked);
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
No comments:
Post a Comment