General X++ Development
How do I use multiple where conditions in X++?
How do I use multiple where conditions in X++?
1 answer
Write an answerUse && when all conditions must be true.
SalesTable salesTable;
while select salesTable
where salesTable.CustAccount == 'US-001'
&& salesTable.SalesStatus == SalesStatus::Backorder
{
info(salesTable.SalesId);
}Keep the filtering in the query whenever possible instead of returning a bunch of rows and filtering them afterward in X++.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer