You are here:
Limit the Levels Within the Relationship Graph
The Relationship Graph shows a graph of all party model records associated with accounts and contacts. You can limit the levels displayed to display the relationship graph only at certain levels, regardless of the party records with the record.
You can control the number of levels displayed in a relationship graph using custom settings or component configuration. For more information about component configuration, see Configure Relationship Graph Properties.
The level value is the depth from the root object to the child object. For example, if the value is one, only the first-level children appear. You can set the value for each Visualforce page. For example, for a page named OpportunityHierarchy, the setting is OpportunityHierarchy.MaxLevelsInGraph = 1. This displays the first-level children. If OpportunityHierarchy.MaxLevelsInGraph = 2, then the second-level children appear.
To set up a custom setting to limit the Relationship Graph levels:
- From Setup, in the Quick Find box, enter Custom Settings.
- Click Custom Settings.
- Next to UISettings, click Manage.
- Click New.
-
Enter the following information:
-
In the Name box, enter the object name, followed by hierarchy, for example ContactHierarchy.
-
In the Key box, enter the object name, then Hierarchy.MaxLevelsInGraph. For example, to create the setting for the Contact object, enter ContactHierarchy.MaxLevelsInGraph.
-
In the Value box, enter the number of levels to display.
For example, enter 1 to show only one level on the graph.
-
- Click Save.

