Dynamics CRM always surprises with something new. More we dig into it more we get new things in Dynamics CRM. Today we will discuss on one of such topic.
Have you seen the under and not under condition in Advance find. Well… When I saw, it surprised me too. So, what does these clauses do?
If you have hierarchy settings defined for an entity then for that entity you can see the above clauses defined in Advance find.
E.g. for Account entity to define Hierarchy settings
Navigate to Setting->Customizations->Components->Entities->Account->Heirarchy Settings.
Click on New. Form will be displayed to select the hierarchy relationship.
Data in the fields that needs to be filled is as below.
- Name – Enter name for the hierarchy.
- Default Quick view form – Choose the form from the list
- Hierarchical Relationship – Choose the hierarchical relationship from the list. In the above we have selected Company Name
Below is the hyperlink “Mark a relationship as enabled for hierarchies” which shows the list of relationships which shows the list of relationships that can be enabled for hierarchy.
Select any relationship and click on Mark hierarchical. That relationship is marked as true and is set.
Now when you go to Advance Find you will see the Under and Not Under clause
Now, On Contact Jim Glynn the Account Name is set as Scott Konersmann (sample)
So in Advance find when we execute the below query we see the contact Jim in the result
Similarly, if we run the query for Not Under then all the contacts excluding Jim in seen in the result.
So the above clauses helps us to quickly view the Contacts which are under/not under the particular contact.
Also if the Hierarchy is defined for a particular record we can see a hierarchy symbol on the record.
Eg. On contact Scott Konersmann (sample) you can see the symbol as below.
On click of the above symbol the hierarchy card opens as shown below
Using Under and Not Under Clauses in Dynamics 365 CRM user can quickly view the records which are under/not under the particular record.