look up


in my form i have to add new field .in that field when i say click on drop down then i should getthe look up of employee name and employee id .

any suggestions???

Which version you are using?

In AX 2009 you can use the emplId EDT, but in AX 2012 there were significant changes made to the employee entity.

take a look at the HCMWorkerLookup class, lookupWorker method. See the cross references for that method to understand the usage.


m working ax 2012 R2 , …customising on “InventQualityOrdertable” form where i am trying to get employee namefrom DirPartyTable & employee id from “HCM Worker” table .

is there another way to do this , mine s not workimg.

have you tried HCMWorkerLookup class?

i just checked lookupWorker method of HCMWorkerLookup class , i can see following code. but not sure about editing part [:(]

else if (stringControl)
formRun = FormAutoLookupFactory::buildLookupFromCustomForm(stringControl, workerLookupForm, AbsoluteFieldBinding::construct(fieldStr(HcmWorker, PersonnelNumber), tableStr(HcmWorker)), args);


public void lookup(FormControl _formControl, str _filterStr)
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource QbdsJoin;

SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(HcmWorker), _formControl);

qbds= query.addDataSource(tableNum(HcmWorker));

QbdsJoin= qbds.addDataSource(tableNum(DirPartyTable));






sysTableLookup.addLookupfield(fieldNum(HcmWorker, PersonnelNumber),true);




finally i got the look up in my form …with the help of relation with HcmWorker.

but in lookup when i select any record , am getting a warning as “Field ‘Project ID’ must be filled in”.

where is the projectId?

finally i am done with this task , its working well.