One of the new features in Dynamics 365 v9 is the Not In query within Advanced Find. 
 
For example, users can query for all Cases that do not have a related Task, or Open Opportunities without any related Activities. 
 
To do this, users launch advanced find from the icon on the navigation bar. In the query, they choose what type of record to look for, and then select a related record type to see the Does not contain data operator. 
Example : Opportunities with No Activities 
 
• Look for: Opportunities 
• Then in the Select section below scroll down to find the Related Entity Activity and select “Activity (Regarding)" and then the Does Not Contain Data operator 
• Click on Results button 
 
This query will return all the Opportunities which have at NO activities associated with them. 
One point to note is that Conditions cannot be added under this – if there are no activities you cannot add any further conditions ! 
 
For those that want to see the detail behind this you can Download the FetchXML code and this will show that these new options for Contains Data and Does not Contain Data are using Inner and Outer joins in the query. 
Share this post:

Leave a comment: