Using a query with SysLookupMultiSelectCtrl
If you wish to use the new SysLookupMultiSelectCtrl class there are a few construct methods out there that you can use. If you need to build one using a dynamic query object you can use this construct method, however the problem with this is that the lookup will contain all the fields in your table. To avoid this you need to remove the fields from the field list and then put in the fields you want:
public void dialogPostRun(DialogRunbase _dialog)
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tablenum(
FormRun formRun;
;
super(_dialog);
formRun = _dialog.dialogForm().formRun()
queryBuildDataSource.
queryBuildDataSource.fields().
queryBuildDataSource.fields().
fsCtrlMultiSelect1 = formRun.design().control(
msCtrl1 = SysLookupMultiSelectCtrl::
}