Hi,
I have a requirement where I have a parameter form with a field called "FilterAccountValues" having multiselect lookup seperated by commas, lets say the filter values are:
FilterAccountValues : A-001,C-002,M-001,311
Now when i navigate to "View Trade Agreements" screen from either customers or release products then i should see only the trade agreement with Account selection as FilterAccountValues. i.e. In the account selection field only the values with account selection A-001,C-002,M-001,311 should be displayed.
I tried writing code on PricediscTable formdatasource priceDiscTable - executeQuery()
I have written below x++ code to achieve this but the highlighted line throws object reference error, can someone please help me with this.
QueryBuildDataSource qbds;
QueryBuildRange qbr;
int conI = 1;
container accountSelectionCon;
container accountSelection = str2con(parameterTable.FilterAccountValues);
ListIterator accountSelectionList = new ListIterator(con2List(accountSelection));
while(accountSelectionList.more())
{
conI++;
accountSelectionCon = conIns(accountSelectionCon, conI, accountSelectionList.value());
accountSelectionList.next();
}
qbds = this.query().dataSourceTable(tablenum(PriceDiscTable));
qbr = qbds.addRange(fieldnum(PriceDiscTable, AccountRelation));
qbr.value(con2Str(accountSelectionCon));
Thanks in advance.