It is different between normal lookup .
public void lookup()
{
HcmWorker selectedRecord;
Args args;
FormRun formRun;
Form workerLookupForm = new Form(formStr(HcmWorkerLookup));
FormControl control = this;
FormStringControl stringControl = control as FormStringControl;
args = new args();
args.name(formStr(HcmWorkerLookup));
args.caller(this);
args.parmObject(this);
/* selectedRecord = HcmWorker::findByPersonnelNumber(stringControl.text());
if(selectedRecord.RecId != 0 )
{
args.lookupRecord(selectedRecord);
}*/
formRun = FormAutoLookupFactory::buildLookupFromCustomForm(stringControl,workerLookupForm,
AbsoluteFieldBinding::construct(fieldStr(HcmWorker, Personnelnumber),tableStr(HcmWorker)),args);
stringControl.performFormLookup(formRun);
}
图片.png
网友评论