Skip to main content

Posts

Showing posts with the label Lookups

Show methods in AX lookups

This sample code is used to show Customer Name in lookup, In AX 2009 we had name field in CustTable but now its moved to DirPartyTable. We still have name() in CustTable which we can use to display name in lookups. AX 2009 client static void lookupInterCompanyItemId(FormStringControl   lookupCtrl, DataAreaId _dataAreaId = "") {     SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable), lookupCtrl);     Query                   query = new Query();     QueryBuildDataSource    qbds = query.addDataSource(tablenum(InventTable));     ;     sysTableLookup.addLookupfield(fieldnum(InventTable, ItemId));     sysTableLookup.addLookupfield(fieldnum(InventTable, ItemName));   ...