public void lookup()
{
SysMultiTableLookup sysMultiTableLookup;
Query query;
QueryBuildDataSource queryBuildDataSource,qbds1;
QueryBuildRange qbr;
VendTable vendtable;
DirPartyTable dirPartyTable;
super();
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(VendTable));
qbds1 = queryBuildDataSource.addDataSource(tablenum(DirPartyTable));
qbds1.relations(true);
sysMultiTableLookup = SysMultiTableLookup::newParameters(VendorAcc,query);
//vendorAcc is control name
sysMultiTableLookup.addLookupfield(fieldNum(VendTable,AccountNum),1);
sysMultiTableLookup.addLookupfield(fieldNum(dirPartyTable,Name),2);
sysMultiTableLookup.parmQuery(query);
sysMultiTableLookup.performFormLookup();
}
{
SysMultiTableLookup sysMultiTableLookup;
Query query;
QueryBuildDataSource queryBuildDataSource,qbds1;
QueryBuildRange qbr;
VendTable vendtable;
DirPartyTable dirPartyTable;
super();
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(VendTable));
qbds1 = queryBuildDataSource.addDataSource(tablenum(DirPartyTable));
qbds1.relations(true);
sysMultiTableLookup = SysMultiTableLookup::newParameters(VendorAcc,query);
//vendorAcc is control name
sysMultiTableLookup.addLookupfield(fieldNum(VendTable,AccountNum),1);
sysMultiTableLookup.addLookupfield(fieldNum(dirPartyTable,Name),2);
sysMultiTableLookup.parmQuery(query);
sysMultiTableLookup.performFormLookup();
}
Thanks for the sharing. Can you please share the class sysMultiTableLookup as its not OTB class.
ReplyDelete