Hi All,
I want to create a query using X++ code to get only two fields Dataarea and Name from CompanyInfo Table in the lookup. there are many fields in table and all are coming.
Class declaration code :-
SysLookupMultiSelectCtrl msctrl;
Query q;
QueryRun qr;
QueryBuildDataSource qbd;
QueryBuildRange qbr;
Form Init method code :-
super();
// mzkCompanyId - Name of control on which you want a lookup.
// CompanyInfo - Table name to get the lookup data
q = new Query();
qbd = q.addDataSource(TableNum(CompanyInfo));
msCtrl = SysLookupMultiSelectCtrl::constructWithQuery(element, mzkCompanyId,q);
In this code, I just want to show Dataarea and Name field
how to achieve it ?