In Ax2009 EmplTable now replaced with hcmWorker Table. To get emplid and emplname below is the lookup code:
public void lookup()
{
HcmWorker hcmWorker;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(hcmWorker.TableId, this);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(hcmWorker.TableId);
queryBuildDataSource.addSortField(fieldNum(HcmWorker, PersonnelNumber));
sysTableLookup.addLookupfield(fieldNum(HcmWorker, PersonnelNumber));
sysTableLookup.addLookupfield(fieldNum(HcmWorker, Person));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
Happy - Daxing :)-
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment