Filter lookup based on enums using relations :
Method: 1
Method: 2
Remove the EDT on ItemId it filters automatically based on ItemType
PerformLookup:
Write this method in Table:
Static FormRun itemRecruitingIdLookup(FormRun lookupFormRun, FormControl _ctrl)
{
FormDataSource formDataSource;
Query formquery;
;
formDataSource = lookupFormRun.objectSet();
formquery = formDataSource.query();
formquery.dataSourceNo (1).addRange (fieldnum (InventTable, ItemType)).value (queryValue (ItemType::BOM));
return lookupFormRun;
}
In form datasource field method write the following code:
public void performFormLookup(FormRun _p1, FormControl _formControl)
{
Super (HRMApplication::hrmRecruitingIdLookup (_p1), _formControl);
}
No comments:
Post a Comment