This is my issue. I have a dialog field “Worker”. I used “HcmWorkerRecId” EDT for this dialog field for lookup. By default, the lookup will display all workers, employees and etc. so I modified the lookup to limit the list in the dropdown. I used the code below to modify the lookup.
FormControl formControl = dlgworkerId.dialog().formRun().controlCallingMethod();
HcmWorkerLookup::newCustomOptions(false, // _includeEmployees
true, // _includeContractors
true, // _includeActive
false, // _includePending
true, // _includeTerminated
true, // _includeOnlyCurrentLegalEntity
true, // _lockWorkerTypeFilters
true, // _lockWorkerStatusFilters
true // _lockLegalEntityFilters
When I tested the lookup, it works fine and it filters data according to the requirement. See screenshot below.
But when trying to select a record in the lookup and click OK, I am getting a message below and won’t allow me to continue. I tried researching but no luck for me. Hope you can help me.
Looking forward to hear from you.