General X++ Development
How do I filter a form datasource in X++?
How do I filter a form datasource in X++?
1 answer
Write an answerAdd a range to the datasource query and rerun the query.
QueryBuildDataSource qbds = SalesTable_ds.queryBuildDataSource();
qbds.addRange(fieldNum(SalesTable, CustAccount))
.value(queryValue('US-001'));
SalesTable_ds.executeQuery();If the filter is changed more than once, find/update the existing range or clear it first. Otherwise you can end up with duplicate ranges that make the form look broken.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer