Hello Guys,
I have a form where I have the field customer account number. I need to list the cities as a lookup for an another field in the same form. I did below for it.
public void lookup(FormControl _formControl, str _filterStr)
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource QbdsJoin;
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(LogisticsPostalAddress), _formControl);
;
qbds= query.addDataSource(tableNum(LogisticsPostalAddress));
qbds.orderMode(OrderMode::GroupBy);
qbds.addGroupByField(fieldnum(LogisticsPostalAddress, City));
qbds.addRange(fieldNum(LogisticsPostalAddress, City),SortOrder::Ascending);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(LogisticsPostalAddress, City));
sysTableLookup.performFormLookup();
}
Now I need to list only the cities related to that particular customer account number. how can i do it.?
Thanks in advance.
*This post is locked for comments