A new feature available in Dynamics CRM 2015 is the ability to visualize a hierarchy of records. This allows a user to ‘see’ where a particular record fits in the within the parent/child relationship for a given entity. For example, an Account record in CRM could have a ‘Parent Account’ or many ‘Sub-Accounts’ or child accounts. It is now possible to display these relationships as a hierarchy visualization.
This Dynamics CRM blog will cover how to view visualizations, import considerations, and how to add and edit a hierarchy visualization.
Our first example will be with the Account entity and how to access the hierarchy. In a list of Accounts, an icon will display if the record has child Accounts, a Parent Account, or both. To access the hierarchy for a particular record, click on that icon.
In this example – we can see that ‘Adventure Works’ has a parent account – ‘Fabrikam, Inc’. This is display as a tree (left side of screenshot) or tile view (middle/right of screenshot)
In order to view further relationships in the hierarchy – can click the arrows to expand further in the tile view. We can now see ‘A. Datum Corporation’ is the parent for ‘Fabrikam’
NOTE: The checkboxes are used to select multiple tiles and edit or run commands on multiple records at once.
It is also possible to access the hierarchy while viewing the record by running the ‘View Hierarchy’ command.
This feature is enabled for the Account, and User entities, but can enabled for other out-of-box entities. The visualization feature can only be enabled for self-referencing relationships within a particular entity, including custom entities. Important items to consider when using hierarchal visualizations (from the MSDN Technet website):
- Only one (1: N) self-referential relationship per entity can be set as hierarchical. In this relationship the primary entity and the related entity must be of the same type, such as account_parent_account or contact_parent_contact
- Presently, a hierarchy or visualization is based on one entity only. You can depict the account hierarchy showing accounts at multiple levels, but you can’t show accounts and contacts in the same hierarchy visualization.
- Maximum number of fields that can be displayed in a tile is four. If you add more fields to the Quick Form that is used for the tile view, only the first four fields will be displayed.
Most important to understand, it is only possible to display a hierarchy of ‘Accounts’ or hierarchy of ‘Contacts’ – but not multiple entities in the same visualization.
To configure an entity for hierarchy visualization – there is a new area in the entity components called ‘Hierarchy Settings’
In this example, we will enable hierarchy for a custom entity we have called ‘Widgets’
1. Go to the entity ‘Hierarchy Settings’. Click New – then ‘Mark a relationship as enabled for hierarchies’.
2. Since the Widget entity has a Parent/Child relationship – we first have to enable hierarchies by selecting the relationship and then Mark hierarchical. Then click Done.
NOTE: If the entity does not have a self-referencing relationship (Parent/Child relationship within the entity) then you will not be able to add or edit a visualization.
3. Enter a name (schema) for the hierarchy and choose the quick view form that will be used for display. Click Save and Close. Once configurations have been made – then you click ‘Publish All Customizations’.
NOTE: The first four fields in the chosen Quick View form will be used in the display.
If you are interested in learning more on this topic you can check out this blog: Hierarchical Security Models in Dynamics CRM 2015 or if you are interested in all the great changes that CRM 2015 has to offer click to view our “favorites” list here: Top 10 New Features of Dynamics CRM 2015.