Hi,
I have this lookup code:
///
///
///
///
///
[FormControlEventHandler(formControlStr(CaseDetailCreate, AAWorker), FormControlEventType::Lookup)]
public static void AAWorker_OnLookup(FormControl sender, FormControlEventArgs e)
{
FormStringControl customerContract = sender.formRun().design().controlName(formControlStr(CaseDetailCreate, AACustomerContract)) as FormStringControl;
if(customerContract.text() != '')
{
SysLookupMultiSelectCtrl multiSelectCtrl;
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(ResourceView));
QueryBuildDataSource qbds1 = qbds.addDataSource(tableNum(PROJVALEMPLPROJSETUP));
Qbds1.joinMode(JoinMode::InnerJoin);
Qbds1.addLink(fieldNum(ResourceView, RecId), fieldNum(PROJVALEMPLPROJSETUP, Resource));
QueryBuildDataSource qbds2 = qbds1.addDataSource(tableNum(AATable1));
qbds2.joinMode(JoinMode::InnerJoin);
qbds2.addLink(fieldNum(PROJVALEMPLPROJSETUP, ProjId), fieldNum(AATable1, OrderNumber));
qbds2.addRange(fieldNum(AATable1, OrderNumber)).value(queryValue(customerContract.text()));
qbds.addSelectionField(FieldNum(ResourceView, ResourceId));
qbds.addSelectionField(FieldNum(ResourceView, Name));
multiSelectCtrl = SysLookupMultiSelectCtrl::constructWithQuery(sender.formRun(), sender, query);
}
else
{
SysLookupMultiSelectCtrl multiSelectCtrl;
Query query = new Query();
QueryBuildDataSource qbds = query.addDataSource(tableNum(HcmWorkerDetailsView));
qbds.addSelectionField(FieldNum(HcmWorkerDetailsView, PersonnelNumber));
qbds.addSelectionField(FieldNum(HcmWorkerDetailsView, Name));
multiSelectCtrl = SysLookupMultiSelectCtrl::constructWithQuery(sender.formRun(), sender, query);
}
}
1. the lookup field is on a dialog, and as you can see the lookup depends on another form control. When the dialog is still open, if i change the value of the control to match the other lookup it doesn't work, it keeps showing the old one until i close the dialog and open it again...
how to solve this?
2.
The UI for both lookups is different, why? i want them both to be the same things, as you can see for the hcmworkerDetailsView i only selected 2 fields but i can still see a lot of fields

however the other lookup looks good and smaller in size.. why is that?