Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming 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