Per aprire la lookup standard sugli Employee è sufficente utilizzare i reference group:
Se invece abbiamo un controllo unbound, possiamo aggiungere alla form un controllo stringa (con EDT = HcmPersonnelNumberId ) e nell'override del metodo lookup del controllo scrivere:
public void lookup()
{
FormRun formRun;
formRun = FormAutoLookupFactory::buildLookupFromCustomForm(this
,new Form(formStr(HcmWorkerLookUp))
,AbsoluteFieldBinding::construct(fieldStr(HcmWorker, PersonnelNumber),
tableStr(HcmWorker)));
this.performFormLookup(formRun);
}
can you help me please, i want get name not personalnumber.
RispondiEliminain this case you should modify closeSelect method of the HcmWorkerLookupForm in this way:
RispondiEliminapublic void closeSelect(str _selectString)
{
formRun formRun;
FormStringControl stringControl;
super(_selectString);
formRun = element.args().caller();
stringControl = formRun.design().controlName(formControlStr(MyForm, MyStringControl));
stringControl.text(HcmWorker.name());
}