RelationshipGraphDefinition

Represents a definition of a graph that you can configure in your organization to traverse object hierarchies and record details, giving you a glimpse of how your business works.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

RelationshipGraphDefinition components have the suffix .relationshipGraphDefinition and are stored in the relationshipGraphDefinitions folder.

Version 

Introduced in API version 55.0.

Special Access Rules 

The Financial Services Cloud permission set license is required to access this object.

Fields 

isActive 

  • Type: boolean

  • Required: Yes

  • Description: Required.

    Indicates whether the relationship graph is available for use (true) or not (false). The default value is true.

This field is read-only in API version 55.0.

Note

isTemplate 

  • Type: boolean

  • Required: Yes

  • Description: Required.

    Indicates whether you can configure this relationship graph as a template (true or not false). The default value is false. In the UI, this field is Set as Template.

masterLabel 

  • Type: string

  • Required: Yes

  • Description: Required.

    A user-friendly name for RelationshipGraphDefinition, which is defined when the RelationshipGraphDefinition is created. In the UI, this field is Label.

relationshipGraphDefVersions 

  • Type: RelationshipGraphDefVersion[]
  • Required: No
  • Description: Represents a list of graph versions associated with the relationship graph definition.

RelationshipGraphDefVersion Type 

The list of graph versions associated with the relationship graph definition.

Fields 

graphDefinition 

  • Type: string

  • Required: Yes

  • Description: Required.

    Specifies a set of properties required to create a relationship graph, such as parent node, child relationships, filter and sort fields, and graph UI elements.

graphType 

  • Type: string

  • Required: Yes

  • Description: Required.

    Specifies the type of graph. In API version 55.0, only HorizontalHierarchy graph type is supported.

Declarative Metadata Sample Definition 

The following is an example of a RelationshipGraphDefinition component.

1<?xml version="1.0" encoding="UTF-8"?>
2<RelationshipGraphDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3     <isActive>false</isActive>
4     <isTemplate>true</isTemplate>
5     <masterLabel>Account Graph</masterLabel>
6     <relationshipGraphDefVersions>
7         <graphDefinition>{
8   "graph" : {
9     "rootNode" : {
10       "object" : {
11         "entity" : "Account"
12       },
13       "configurationType" : "Primary",
14       "sortFields" : [ {
15         "field" : {
16           "field" : "LastModifiedDate",
17           "whichEntity" : "TARGET"
18         },
19         "order" : "DESC"
20       } ],
21       "nodeUiConfig" : {
22         "fieldsToDisplay" : [ ],
23         "showFieldLabels" : true,
24         "actions" : { }
25       },
26       "childRelationships" : [ {
27         "OneToMany" : {
28           "targetObjectNode" : {
29             "object" : {
30               "entity" : "Contact"
31             },
32             "configurationType" :"Custom",
33             "sortFields" : [ {
34               "field" : {
35                 "field" : "LastModifiedDate",
36                 "whichEntity" : "TARGET"
37               },
38               "order" : "DESC"
39             } ],
40             "nodeUiConfig" : {
41               "fieldsToDisplay" : [ {
42                 "field" : "Name",
43                 "whichEntity" : "TARGET"
44               }, {
45                 "field" : "Phone",
46                 "whichEntity" :"TARGET"
47               } ],
48               "showFieldLabels" : true,
49               "actions" : {
50                 "containerActions" : [ {
51                   "action" : "New"
52                 } ],
53                 "recordActions" : [ {
54                   "action" : "Edit"
55                 }, {
56                   "action" : "Delete"
57                 } ]
58               }
59             },
60             "childRelationships" : [ ]
61           },
62           "relationshipUiConfig" : { },
63           "filter" : {
64             "filterCriteria" : [ {
65               "field" : {
66                 "field" : "Name",
67                 "whichEntity" : "TARGET"
68               },
69               "operator" : "eq",
70               "value" : "Salesforce"
71             } ],
72             "booleanFilter" : "1"
73           },
74           "targetObjectField" : {
75             "field" : "AccountId",
76             "whichEntity" : "TARGET"
77           }
78         }
79       } ]
80     },
81     "globalUiConfig" : {
82       "borderColor" : "Green2",
83       "borderThickness" : "2px";,
84       "colorShading" : "Black",
85       "fieldLayout" : "Vertically Stacked",
86       "recordContainerExpansion" : true,
87       "recordExpansion" : true
88     }
89   }
90 }</graphDefinition>
91         <graphType>HorizontalHierarchy</graphType>
92     </relationshipGraphDefVersions>
93</RelationshipGraphDefinition>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3   <fullName>Package1</fullName>
4   <types>
5       <members>*</members>
6       <name>RelationshipGraphDefinition</name>
7   </types>
8   <version>55.0</version>
9</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.