Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I am trying to filter my grid, but with a value from another.
I am trying to filter on salesline form, but i only want to see records which are not "invoiced".
How can i create that filter on salesline form? i only know how to filter on a combobox on the form, something like that.
The value should not invoiced. So it should be something like:
criteriaStatus.value(salesLine.salesStatus != salesTable::find(salesLine.salesId).salesStatus)
Don't quite understand query range can help my problem?
Can you confirm that this question is about coding, as others seem to assume? Maybe you just want to filter it in user interface?
Also, what are table are you talking about? Can't you simply use sales status field on the line itself?
By the way, you can do many complicated things (including adding other tables to queries) in the Advanced Filter/Sort dialog (Ctrl+F3).
Martin: i will tag it next time it is about coding. And the reason i can't use salesStatus on my solution, using salesTable/salesLine is an example.
Crispin: How do i ensure all the records are sorted by the salesTable not being "invoiced"?
All right, I've changed the category from Other to Development / Customization / SDK.
It's pretty simple - add the other table to the query, add a range on it and then use valueNot() when specifying the value.
Thanks Martin, but the field one does not contain the status::invoiced. But contain the salesId. I am trying to use the salesid to get the status from the table. But is it possible?
Aha, so you don't know how to join two tables, right?
Get a reference to the QueryBuildDataSource to which you want to join the table. Call addDataSource(tableNum(YourTable)) to add the other table.
Consider which join type to use - one option is using ExistJoin with a negative condition, another using NotExistJoin with a positive condition.
Then you have to define which fields should be used for joining. If there is a relation, call relations(true) on the new datasource. If not, consider adding one, or use addLink().
When you have that, add a range to the new datasource as explained in my previous reply.
Ok i'll give a shot by using qbds and then when i have i'll try to set a new range to the new datasource. and use that in the execute query, and the filtering by it?
Business Applications communities