static void queryMultipleValue(Args _args)
{
Query query;
QueryRun queryrun;
QueryBuildDataSource qbds;
QueryBuildRange qbr, qbr1;
SalesTable salesTable;
str rangevalue;
;
query = new Query();
qbds = query.addDataSource(tableNum(SalesTable));
qbds.addSortField(fieldNum(SalesTable, CustAccount), SortOrder::Ascending);
qbr = qbds.addRange(fieldNum(SalesTable, CustAccount));
qbr.value(strFmt("%1,%2,%3", queryValue("US-4000"), queryValue("US-027"), queryValue("US-028")));
queryrun = new QueryRun(query);
info(strFmt(queryrun.toString()));
while(queryrun.next())
{
salesTable = queryrun.get(tableNum(SalesTable));
info(strFmt("%1", salesTable.CustAccount));
}
}
{
Query query;
QueryRun queryrun;
QueryBuildDataSource qbds;
QueryBuildRange qbr, qbr1;
SalesTable salesTable;
str rangevalue;
;
query = new Query();
qbds = query.addDataSource(tableNum(SalesTable));
qbds.addSortField(fieldNum(SalesTable, CustAccount), SortOrder::Ascending);
qbr = qbds.addRange(fieldNum(SalesTable, CustAccount));
qbr.value(strFmt("%1,%2,%3", queryValue("US-4000"), queryValue("US-027"), queryValue("US-028")));
queryrun = new QueryRun(query);
info(strFmt(queryrun.toString()));
while(queryrun.next())
{
salesTable = queryrun.get(tableNum(SalesTable));
info(strFmt("%1", salesTable.CustAccount));
}
}
Thanks for sharing the valuable information. Keep on sharing.
ReplyDeleteD365 Finance and Operations Training
D365 Finance and Operations Online Training
D365 Finance and Operations Training in Hyderabad
D365 Finance Training
D365 Operations Training