DYNAMICS 365 V9 ADVANCED FIND ASSOCIATION WITH OPERATOR DOES NOT CONTAIN DATA
One of the interesting feature that Microsoft added in D365 V9 is Contains Data & Does Not Contain Data
options in the Advanced Find related records.
The purpose of this feature is to have the ability to search for records that are not related to child records.
For example: Accounts with no Cases, Contacts with no Tasks... and any other similar needs.
In previous CRM versions, we were not able to do this directly in the Advanced Find;
but now, it is feasible and so easy through Advanced Find.
-
Example 1 (Contains Data): Show all Accounts that have Cases linked to them
- In D365 V9 environment, open the Advanced Find
- Select Accounts in the Look for option
- Under the Fields section, select any field to filter the accounts if needed
- Scroll down to the Related section and select Cases
- When you selected the Cases entity, you notice the new drop down displayed to the right with the two options Contains Data & Does Not Contain Data. For this example, choose the option Contains Data
- When you choose the Contains Data options, you will be able to add all the needed filters against the related record as always been done
- You can verify what type of relation this query generates by clicking Download Fetch XML in the header and checking the link-type attribute. In this example, the link-type will be inner
-
Example 2 (Does Not Contain Data): Show all Accounts that don't have Cases linked to them
- In D365 V9 environment, open the Advanced Find
- Select Accounts in the Look for option
- Under the Fields section, select any field to filter the accounts if needed
- Scroll down to the Related section and select Cases
- For this example, choose the option Does Not Contain Data. You will notice that you will not be able to add any filter to the Cases entity part of the query
- You can verify what type of relation this query generates by clicking Download Fetch XML in the header and checking the link-type attribute. In this example, the link-type attribute will be outer
Limitation:
Since we cannot add any condition to the related entity when we choose the option Does Not Contain Data, we will not be able to create queries such as Accounts without Low Priority Cases.
Since we cannot add any condition to the related entity when we choose the option Does Not Contain Data, we will not be able to create queries such as Accounts without Low Priority Cases.
Hope This Helps!
Comments
Post a Comment