public void lookup(FormControl _formControl, str _filterStr)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(InventItemBarcode), _formControl);
Query query = new Query();
QueryBuildDataSource qbds;
;
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, ItemBarcode), true);
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, Description));
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, LIQ_Sell_ItemId));
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, LIQ_UnitId));
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, LIQ_Primary));
sysTableLookup.addLookupfield(fieldnum(InventItemBarcode, LIQ_Active));
qbds = query.addDataSource(tablenum(InventItemBarcode));
qbds.addRange(fieldnum(InventItemBarcode, ItemId)).value(queryValue(RCMJournalItemTrans.ItemId));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
Tuesday, March 29, 2011
Custom FormDatasource lookup
The following sample demonstrates how to add custom lookup to field on an AX form
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment