Under and Not Under Clauses in Dynamics 365 CRM

By | November 29, 2018

Introduction:

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.

Under and Not Under Clauses in Dynamics 365 CRM

Click on New. Form will be displayed to select the hierarchy relationship.

Under and Not Under Clauses

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.

Under and Not Under Clauses in Dynamics 365 CRM

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

Under and Not Under Clauses in Dynamics 365 CRM

Now, On Contact Jim Glynn the Account Name is set as Scott Konersmann (sample)

Under and Not Under Clauses in Dynamics 365 CRM

So in Advance find when we execute the below query we see the contact Jim in the result

Under and Not Under Clauses in Dynamics 365 CRM

Under and Not Under Clauses in Dynamics 365 CRM

Similarly, if we run the query for Not Under then all the contacts excluding Jim in seen in the result.

Under and Not Under Clauses in Dynamics 365 CRM

Under and Not Under Clauses in Dynamics 365 CRM

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.

Under and Not Under Clauses in Dynamics 365 CRM

On click of the above symbol the hierarchy card opens as shown below

Under and Not Under Clauses in Dynamics 365 CRM

Conclusion:

Using Under and Not Under Clauses in Dynamics 365 CRM user can quickly view the records which are under/not under the particular record.

Click2Clone-Promo