AX2012 R2: Runtime lookup with multiple table

I want to modify the lookup for ItemId in that the item name/product name must be included in the lookup. the thing is, the item name/product name should be filterable.

i have overridden the lookup method for the Item Id in my form. and have this code be executed:

public void lookup()


SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventTable),this);

Query query = new Query();

QueryBuildDataSource qbds2;

QueryBuildDataSource qbds3;

QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(InventTable));

qbds2 = queryBuildDataSource.addDataSource(tableNum(EcoResProductTranslation));







//sysTableLookup.addLookupfield(fieldNum(EcoResProductTranslation, Product));

sysTableLookup.addLookupfield(fieldNum(EcoResProductTranslation, Name));





unfortunately, i ended up having this thing:

to sum this thing up,

  1. i want to include the item name in the lookup.

  2. The name must be filterable.

You use field IDs from two tables, but you have only one datasource. For example, EcoResProductTranslation.Name has ID 4, therefore when you ask for a field with such ID in the InventTable datasource, you get InventTable.ItemType field (because it has ID 4).

What you need is SysMultiTableLookup class or something like that.

Hey!! Here is a references example kindly look into it, if any is still facing the same issues :…/multi-table-lookup-display-fields-from.html