Newer Version Available
ObjectHierarchyRelationship
File Suffix and Directory Location
ObjectHierarchyRelationship components have the suffix ObjectHierarchyRelationship.settings and are stored in the ObjectHierarchyRelationship folder.
Version
ObjectHierarchyRelationship components are available in API version 51.0 and later.
Fields
| Field Name | Description |
|---|---|
| childObjectMapping |
|
| childObjectMappingId |
|
| inputObjRecordsGrpFieldName |
|
| mappingType |
|
| masterLabel |
|
| outputPntRelationshipFieldName |
|
| parentObjectMapping |
|
| parentObjectMappingId |
|
| parentRecord |
|
| parentRelationshipFieldName |
|
| sourceReferenceRelaFieldName |
|
| usageType |
|
Represents a set of inputObject, mappingFields, and outputObject entries.
Fields
| Field Name | Description |
|---|---|
| inputObject |
|
| mappingFields |
|
| outputObject |
|
Represents a set of inputField and outputField entries.
Fields
| Field Name | Description |
|---|---|
| inputField |
|
| outputField |
|
Declarative Metadata Sample Definition
The following is an example of a ObjectHierarchyRelationship component.
1<?xml version="1.0" encoding="UTF-8"?>
2<ObjectHierarchyRelationship
3 xmlns="http://soap.sforce.com/2006/04/metadata">
4 <parentObjectMapping>
5 <inputObject>Opportunity</inputObject>
6 <outputObject>SalesAgreement</outputObject>
7 <mappingFields>
8 <inputField>AccountId</inputField>
9 <outputField>AccountId</outputField>
10 </mappingFields>
11 <mappingFields>
12 <inputField>CloseDate</inputField>
13 <outputField>StartDate</outputField>
14 </mappingFields>
15 </parentObjectMapping>
16 <childObjectMapping>
17 <inputObject>OpportunityLineItem</inputObject>
18 <outputObject>SalesAgreementProduct</outputObject>
19 <mappingFields>
20 <inputField>TotalPrice</inputField>
21 <outputField>TotalPlannedAmount</outputField>
22 </mappingFields>
23 </childObjectMapping>
24 <usageType>ConvertToSalesAgreement</usageType>
25 <masterLabel>TestOptyToSalesAgreement</masterLabel>
26 <parentRelationshipFieldName>Opportunity</parentRelationshipFieldName>
27 <outputPntRelationshipFieldName>SalesAgreement</outputPntRelationshipFieldName>
28 <parentRecord></parentRecord>
29 <inputObjRecordsGrpFieldName>Account</inputObjRecordsGrpFieldName>
30 <mappingType>ParentToParent</mappingType>
31</ObjectHierarchyRelationship>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 <types>
4 <members>*</members>
5 <name>ObjectHierarchyRelationship</name>
6 </types>
7 <version>51.0</version>
8</Package>Usage
Use the deploy() call to deploy metadata with a .zip file. Every .zip file contains a project manifest, a file that’s named package.xml, and a set of directories that contain the components. The manifest file defines the components that you’re trying to retrieve or deploy in the .zip file. The manifest also defines the API version that’s used for the deployment or retrieval. For more information on the .zip file, deploying, and retrieving metadata, see Deploying and Retrieving Metadata with the Zip File. You can also deploy and retrieve the metadata API. using Workbench