Partager via


How to Enable Hierarchy to Contacts in Dynamics CRM 2015

In a previous blog post "Visualize hierarchical data in CRM 2015" I showed you how to visualize the out-of-the-box hierarchy for Accounts.

To enable a hierarchy, you need to have at least one self referential 1:N relationship. After creating the relationship, you can select one 1:N relationship as hierarchy relationship. In this blog post I'll show how to do this for the Contact entity

Go to Settings > Customize and select Customize the System.


Fig. 1 - customize the system

x

Expand Contacts

Fig. 2 - Contacts entity

x

Click 1:N Relationships and then New 1-to-many relationship

Fig. 3 - relationships

x

Select Contact as “Related Entity”. Provide a name. Specify this relationship as "Hierachical" . Select “Yes” to “Hierarchical”. Provide a Display Name for the Lookup Field

Click Save and Close

Fig. 4 - define relationship

x

Navigate to Contact > Hierarchy_Settings and click New

Fig. 5 - hierarchical settings

x

Enter unique name and select any card (quick view form - you can customize those)

Click here in the 'Please click here to mark a relationship as hierarchical' string to open the dialog

Fig. 6 - mark as hierarchical

x

Select the newly created referential 1:n relationship and click Done

Fig. 7 - select relationship

x

Note the Hierarchical Releationship box now lists the relationship

Fig. 8 - verify selection

x

Navigate to Forms, and open any form - eg Contacts

Fig. 9 - edit form

x

Add the relationship lookup field ("Parent Contact") to the form, and then publish all customizations

Fig. 10 - add Lookup field

x

Now done with the configuration set the “Parent Contact” for several contact records and see Hierarchy view

Fig. 11 - define parent

x

Fig. 12 - contacts with hierarchy icon

x

Fig. 13 - visualization one branch

x

Fig. 14 - visualization another branch

x

Note: Dynamics CRM 2015 is in beta when writing this blog post. Things can change between now and the actual launch of the service

Comments

  • Anonymous
    October 29, 2014
    Wow awesome thanks for this!
  • Anonymous
    January 09, 2015
    Wow cool
  • Anonymous
    January 29, 2015
    very well described. I have a question, can we do this for the Connection (if I make is for a family relations)?
  • Anonymous
    September 09, 2015
    I also want to know whether we can do this for Connections or if Hierarchies use the same structure as Connections or if they are like Relationships. I like and need the many to many structure of Hierarchies (for instance where an Account can supply multiple Accounts)
  • Anonymous
    November 13, 2015
    Very Nice!
  • Anonymous
    February 11, 2016
    Is it possible to hide enabled records from the view?