Display all/specific AOT tables in a lookup

For displaying all/specific AOT objects like tables in the lookup control, we need to iterate the UtilidElements table with our desired criteria. static void lookupAOTTables(FormStringControl _ctrl) { SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(UtilidElements), _ctrl); Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange nameQBR, typeQBR; ; sysTableLookup.addLookupfield(fieldnum(UtilidElements, Name)); sysTableLookup.addLookupfield(fieldnum(UtilidElements, Id)); queryBuildDataSource = query.addDataSource(tablenum (UtilidElements)); nameQBR = queryBuildDataSource.addRange(fieldnum(UtilidElements, name));…

Container and unbounded string (text) fields are not allowed in a WHERE expression in AX.

Hi, The problem: Axapta does not want you to use an unbounded string in a where clause. The solution: You must use a ‘bounded’ string. To do this you must declare your string with a numerical limiter e.g. str 30. Example: PurchTable getFirstByCustomerPOId(str 30 customerPOId) { PurchTable purchTable; ; purchTable.selectForUpdate(true); select firstonly purchTable where purchTable.My_CustomerPurchaseOrderId…