Visual hierarchies can be created on all custom entities and for some out of the box entities too. The first major rule to follow is that the relationship you use must be a 1:N (or N:1) self-referential relationship, so in the example that follows there is a Project entity, and it has a 1:N relationship to itself. Also the second rule is that you can only have one of these relationships that are marked as hierarchical. (you’ll see that later). So you can’t make another one for Account, Product etc. for example as these already come out of the box.
So this is a quick post detailing 3 quick steps on how to set up a visual hierarchy on a custom entity. There are variations of this e.g. different places you can do things but I find this the easiest way so far…
Step 1. Create your field and put it on your form
Create a field e.g. ‘Parent Project’ of type ‘Lookup’ to your same custom entity, save it and place it on your form. Its normally helpful to remember the name of the relationship, especially if you have a few.
Step 2. Open your relationship and mark it as hierarchical.
Open your relationship in your entity and change the setting ‘Hierarchical’ from ‘No’ to ‘Yes’ and save the record.
Here, if you have not followed (or was unaware) of the rules that you cannot have anything other than a self-referential relationship or if the entity your working with already has one, you will be notified in an error message when you try and save it.
Step 3. Create a new Visual Hierarchy setting on your relationship
Go down to the bottom of your entity to ‘Hierarchy Settings’ and select ‘New’. Complete the form and save & close. The name you make does not have to relate to your relationship name.
And your done! Time to test it – with this one I created a main parent project first (by leaving the ‘Parent Project’ field blank) and set up 3 child projects related to that Parent (By filling in the Parent Project lookup field) and then made a second child project related to one of the children. So you can see that it has a very large scope. You can click the little chevrons ‘>’ that appear if you have more than 3 horizontally or vertically to see the hidden cards.
You can edit the fields that you see on the Visual Hierarchy ‘cards’. This will be covered in another post.
Hope that helps, any questions please leave them in the comments & I’ll do my best to assist.