To whom it will be interesting.
Thanks to help of my colleague, the problem was solved in the following manner:
In SysLookupMultiSelectGrid two methods has been created:
public container newParmSelectId(container _selectedId = selectedId)
{
selectedId = _selectedId;
return selectedId;
}
And
public static void newlookup(Query _query,
FormStringControl _ctrlIds,
FormStringControl _ctrlStrs,
container _selectField,
queryRun _queryRun = null)
{
SysLookupMultiSelectGrid lookupMS = new SysLookupMultiSelectGrid();
lookupMS.parmCallingControlId(_ctrlIds);
lookupMS.parmCallingControlStr(_ctrlStrs);
lookupMS.parmQuery(_query);
lookupMS.parmQueryRun(_queryRun);
lookupMS.parmSelectField(_selectField);
lookupMS.pclParmSelectId(conNull());//this is the new line, which is absent in the original lookup method
lookupMS.run();
}
So, the code in the overridden method in UIBuilder class is the following
public void myLookup(formstringcontrol _control)
{
query query = new query(querystr(myQuery));
container cnt;
;
SysLookupMultiSelectGrid::newlookup (q, _control, _control, cnt);
}