UIObjectRelationConfig defines an admin-created configuration for the object relation UI component. It identifies the object providing context, the object whose data is displayed, the relationship connecting them, and the rows of content shown by the component. Use of this metadata type requires Health Cloud or Life Sciences Cloud.
The context object and related object have different roles: contextObject supplies the context, while relatedObject contains the data to display. The configuration's metadata identity, inherited fullName, is also distinct from its UI label, masterLabel.
Key Elements
| Element | What the Element Controls |
|---|---|
contextObject |
Required. The object that provides context for the configuration. |
relatedObject |
Required. The object containing the data the component displays. |
relationshipType |
Required. Accepts Direct, Indirect, InverseDirect, or Self. |
directRelationshipField |
The connecting field for a direct relationship. The field description and published example disagree about which object holds this field; see Documentation Inconsistencies. |
indirectRelationshipObject |
The junction object, an object connecting the context and related objects, for an indirect relationship. |
indirectObjectContextField, indirectObjectRelatedField
|
The fields on the junction object that connect it to the context object and related object, respectively. |
contextObjectRecordType, relatedObjectRecordType
|
The record types for the context object and related object, respectively. |
isActive |
Whether the configuration is active: true or false. |
masterLabel |
Required. The configuration's UI label, not its metadata identity. |
UIObjectRelationFieldConfigs |
The contained row configurations. Each row defines its label, content query, and display position. |
displayLabel |
Required within each row. The user-defined label displayed for that row. |
queryText |
Required within each row. A case-insensitive template query that generates the row's content. |
rowOrder |
Required within each row. An integer controlling top-to-bottom display order, not a documented query execution sequence. |
Behavior and Constraints
Interpret the relationship settings together. For a Direct relationship, directRelationshipField identifies the connecting field. For an Indirect relationship, indirectRelationshipObject identifies the junction object, and indirectObjectContextField and indirectObjectRelatedField identify its connections to the two objects.
contextObjectRecordType and relatedObjectRecordType identify record types for their respective objects. They are separate settings and should not be treated as a single record type selection for the whole configuration.
isActive indicates whether the configuration is active. The required top-level settings are contextObject, relatedObject, relationshipType, and masterLabel. Each contained row requires displayLabel, queryText, and rowOrder.
How row content is generated
A row can display a field directly from the related object or reach another object through a relationship. The documented queryText examples store JSON text with these parts:
-
startNode.initialObjectis set toRelatedObject. -
traversalNodesdescribes an optional relationship traversal. An empty array is used in the examples that read directly from the related object. -
fieldNode.fieldEnumOrIdselects the field value to display.
The direct-field examples display ShippingAddress, Phone, and Fax from the related Account. The parent-organization example starts at that Account, traverses ParentId with destinationObjectEnumOrId set to Account and traversalDirection set to parent, then displays Name. These are example query structures, not defaults required for every configuration.
Deployment and Retrieval
Components use the .uiObjectRelationConfig suffix and are stored in the uiObjectRelationConfigs folder. The type extends Metadata and inherits fullName as its component identity.
In package.xml, use UIObjectRelationConfig as the type name. The type supports * in members for wildcard retrieval. See Deploying and Retrieving Metadata with the Zip File for manifest usage.
The entries in UIObjectRelationFieldConfigs are contained parts of the parent configuration, not separate deployment identities. Treat their labels, queries, and ordering as part of the UIObjectRelationConfig component.
Dependency checks must cover both the top-level relationship settings and the content queries. Object, field, and record type references appear in the relationship settings, but queryText can also embed object and field identifiers, including fields reached through traversal. Inspecting only contextObject, relatedObject, and the connecting fields can miss dependencies needed to generate displayed content.
Relationships
The configuration references object metadata, record types, and relationship fields. Its embedded row queries can introduce additional dependencies beyond these explicit element references.
References
-
CustomObject:contextObject,relatedObject,indirectRelationshipObject. -
CustomField:directRelationshipField,indirectObjectContextField,indirectObjectRelatedField. -
RecordType:contextObjectRecordType,relatedObjectRecordType.
Documentation Inconsistencies
The description of directRelationshipField places the relationship field on the related object. However, the published Direct example sets contextObject to Contact, relatedObject to Account, and directRelationshipField to AccountId. In that example, AccountId is the lookup field on Contact, the context object.
Do not infer which object holds the field from the field description alone. Interpret the configured context and related objects together with the actual relationship field.
Common Questions
Do I need Health Cloud or Life Sciences Cloud to use UIObjectRelationConfig?
Yes. Use of this metadata type requires Health Cloud or Life Sciences Cloud.
How do I retrieve all UIObjectRelationConfig components?
Use UIObjectRelationConfig as the type name and * as the member in package.xml. Component files use the .uiObjectRelationConfig suffix in the uiObjectRelationConfigs folder.
Does rowOrder control query execution order?
rowOrder controls top-to-bottom display order. It is not documented as a query execution sequence.
Can a row display data from a parent of the related object?
Yes. The documented parent-organization query starts at the related Account, traverses ParentId in the parent direction, and displays the parent Account's Name.
Which dependencies can be missed when deploying this configuration?
Object and field identifiers embedded in queryText can be missed by checks limited to top-level relationship settings. Include fields and objects reached through query traversal, and keep the row configurations within their parent UIObjectRelationConfig.