qbr = this.query().dataSourceNo(1).addrange(fieldNum(SalesTable, SalesStatus));
qbr.value(queryValue((SalesStatus::Backorder)));
qbr = this.query().dataSourceNo(1).addrange(fieldNum(SalesTable, DeliveryDate));
qbr.value(DateFilter.valueStr());
super();
This code doesn't seem to filter open order for a specific date. Please help.
*This post is locked for comments
I'm not sure what you want to see instead. What you're doing is indeed building a SQL query that will be sent to database, therefore the debugger offers you a way to review whether you've really built what you intended.
It is a custom form. Datevalue() method solved the problem. I am learning Dynamics ax, in training.
How to debug A query using debugger. For example, for a str, date variable i can see value being passed on to a variable. On other hand, for query, whatever is writern is transformed to select statement.. I am beginner Martin, any guidance will be greatly appreciated and I will be thankful for your help.
In which form?
Also you still didn't mention any debugging. First of all, open personalization of your form, switch to the Query tab and review whether your ranges are there.
I think you'll see them, but with invalid value of the DeliveryDate range, because you're setting it wrong. Use qbr.value(queryValue(DateFilter.dateValue()) instead of qbr.value(DateFilter.valueStr()).
SalesTable_ds.ExecuteQuery. I wrote this code in SalesTable datasource execute query. SalesTable is in 1st position.
Unfortunately we can't help you, because you didn't gave us any context. First of all, tell us where you're using your code, because it may be at a wrong place.
Then tell us how you debugged it before giving it up and coming here.
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator