Проблема анологична, описаной
тут
только описаное там же решение не помогает.
Вот код перекрытого мною лукапа:
X++:
public void lookup()
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup;
;
this.text('');
sysTableLookup = SysTableLookup::newParameters(tableNum(RD_InventType), this);
sysTableLookup.addLookupField(fieldNum(RD_InventType, InventTypeMK));
sysTableLookup.addLookupField(fieldNum(RD_InventType, prefix));
queryBuildDataSource = query.addDataSource(tableNum(RD_InventType));
queryBuildDataSource.addSortField(fieldNum(RD_InventType, InventTypeMK));
queryBuildDataSource.addSortField(fieldNum(RD_InventType, prefix));
queryBuildDataSource.orderMode(orderMode::GroupBy);
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
// super();
}