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)); ...
A library with Microsoft Dynamics AX, Microsoft Dynamics 365 FinOps and Supply Chain Management, Power Platform, Integrations, development and functional processes, tricks and trip, tutorials and much more....