Hi Everybody, I’ve a employee lookup,which displays both the employee id and employee name, I want to display “EMPLOYEE NAME” in the field,when i select the employee id from the lookup. Is there any way to do this…please help **I want to display the name wherever i select the employee from lookup thourghout AX Please Help. -Regards, Rajee
Hi,
Use edit method for lookup.
Hai
You can override modfied field in table level/form level of empl id field.
OR display method for employe name based on emplid.
Regards
Shon
Hi,
Use the following code on your table
edit Name Name(boolean set,EmplId val)
{
if (set)
{
if (!val)
{
warning(“Error”);
}
else
this.EmplId = val;
}
return EmplTable::find(this.EmplId).name();
}
use this method as a control for form in place of emplId field control.and override lookup method for this control by following code
public void lookup()
{
Args args;
FormRun formRun;
;
args = new Args();
args.name(formstr(MIN_EmplLookUpId));//MIN_EmplLookUpId will be your lookup form.
args.caller(this);
formRun = classfactory.formRunClass(args);
formRun.init();
this.performFormLookup(formRun);
}
Hope this will work as solution.