In the previous post, I was explaining about Hierarchy Relationship in CRM 2015, as we know we can have now I am explaining how to Configure the Hierarchy Relationship Setting for Custom Entity.

Let’s Get Started

Now let’s configure it!

Create a Custom Entity

Let’s create a custom entity, I create a custom entity, so-called as ‘Project’

 
image

Create New Fields

To make this scenario more complex and interested, let’s we create additional fields, such as Project Amount and Customer (Account). Thus, we can use those fields to show in the form.

Create the Relationship

Now, create the Relationship and make sure it is a self-referential relationship, it means that a relationship with Primary entity and the Child entity are the same entity.

image

And make sure you set the Hierarchical to ‘Yes’, it is very important.

Configure the Hierarchy Relationship

Now, go to the next setting, there is ‘Hierarchy Settings’ and Create New.

image

Now it will open a new windows allowing you to create only one new Hierarchy Setting and you are required to give name and choose default Quick View Form, if you don’t have this Form, then you should create at least one Quick View Form.

image

Create the New Quick View Form

Put the important fields into the Form.

image

Save it.

You can create more than 1 Quick View Form, but you need only one default form.

image

*Remember in this post, we can only display 4 fields shown in the each diagram shape block, to display more info you can achieve this by switching the Form, so we need to create multiple Quick View Forms to achieve this and choose one as the default.

Save it.

And check this:

image

It should show ‘True’.

Do not forget to Save and Publish All Customizations

image

Create the Sample Data

After you published, it is the time to create the hierarchical data, before that make sure you have configured all the important fields in to the Main Form.

After you create several data with parent-child relationship enable, you can see the View Hierarchy upon you saved it.

image

View All Data

image

See the Result

Now, let’s see the visualization.

image

You can see the hierarchy of the Project in each record perspective, either from the top one, the middle level, or the lowest level, you can select and jump to another related record in line.

In the left side is the tree view which you can Expand and Collapse.

In the Center is the Hierarchy Diagram.

And if you select the record, as usual plus contextual it will allow you to perform some actions defined in the Ribbon/Command Bar

image

Well, it is a nice visualization from Out of the Box functionality, now I want to make it more beautiful by adding pictures.

How to Show with Pictures?

First of all, you need to enable the Entity Image that was first time introduced in CRM 2013.
Go to the Entity detail and enable the Entity Image by creating a new image field.

image

And go to the Form display properties

image

Check the ‘Show image in the form’ checkbox

Save it and do not forget to publish it.

And Now you should add the Image, in this example is the image of the Project Manager, update your data and get back to see your result.

Visualize your Data with Diagram plus the Picture, it means 1000 words!

 

image

image

image

Hope this helps you!
Thanks.