RecordAggregationDefinition
Parent Type
File Suffix and Directory Location
RecordAggregationDefinition components have the suffix .RecordAggregationDefinition and are stored in the RecordAggregationDefinitions folder.
Version
RecordAggregationDefinition components are available in API version 59.0 and later.
Special Access Rules
To access the RecordAggregationDefinition metadata type, you must have the Record Aggregation permission set license and the Record Aggregation Access permission.
Fields
aggregateFromObject
- Field Type: string
-
Description: Required.
API name of the object from which data is aggregated.
aggregateToObject
- Field Type: string
-
Description: Required.
API name of the object to which data is aggregated.
aggregationType
- Field Type: RecordAggregationDefinitionAggregationType (enumeration of type string)
-
Description: Required.
Type of the data aggregation.
Valid value is:
- Record
batchProcessingDefinition
- Field Type: string
- Description: Data Processing Engine definition that aggregates data from one record to another.
description
- Field Type: string
- Description: Description for this record aggregation definition.
displayName
- Field Type: string
-
Description: Required.
Name of the record aggregation definition that's displayed in the record page.
onDemandProcDefinition
- Field Type: string
- Description: Data Processing Engine definition that aggregates data from one record to another on demand. Available in API version 63.0 and later.
recordAggregationObject
- Field Type: RecordAggregationObject[]
- Description: List of record aggregation objects in the record aggregation join sequence.
status
- Field Type: RecordAggregationDefinitionStatus (enumeration of type string)
-
Description: Required.
Status of this record aggregation definition.
Values are:
- Active
- Draft
- Inactive
RecordAggregationObject
Represents an object in the record aggregation join sequence.
associatedObject
- Field Type: string
-
Description: Required.
API name of the object associated with this record aggregation object.
developerName
- Field Type: string
- Description: Developer name of the record aggregation object. May contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
filterLogic
- Field Type: string
-
Description: Logical sequence in which the record aggregation object
filters associated with this record aggregation object
are applied to the associated object's records. If you
define two or more record aggregation object filters,
but don’t specify the sequence in which to apply the
filters, the filters are applied by using a logical AND
expression.
Available in API version 60.0 and later.
masterLabel
- Field Type: string
-
Description: Required.
A user-friendly name for RecordAggregationDefinition, which is defined when the RecordAggregationDefinition is created.
recordAggregationJoinCondition
- Field Type: RecordAggregationJoinCondition[]
- Description: List of join conditions that apply to this record aggregation object.
recordAggregationObjectFilter
- Field Type: RecordAggregationObjectFilter[]
-
Description: List of filters that are applied to the records of this
record aggregation object.
Available in API version 60.0 and later.
RecordAggregationJoinCondition
Represents a condition in a join between two record aggregation objects.
joinField
- Field Type: string
-
Description: Required.
API name of the field on the record aggregation object's associated object that is used in the join condition.
navigationSequenceNumber
- Field Type: int
-
Description: Required.
Sequence number corresponding to this join in the join sequence from the object to which the data is aggregated to the object that contains the data being aggregated.
relatedJoinField
- Field Type: string
-
Description: Required.
API name of the field on the related record aggregation object's associated object that is used in the join condition.
relatedRecordAggregationObject
- Field Type: string
-
Description: Required.
Second record aggregation object in the join condition.
type
- Field Type: RecordAggregationJoinConditionType (enumeration of type string)
-
Description: Required.
Type of this record aggregation join in the join path from the object to which the data is aggregated to the object that contains the data being aggregated.
-
Possible values:
- AggregateFrom
- AggregateTo
- Intermediate
RecordAggregationObjectFilter
Represents a filter that is applied to the records of an object in the record aggregation join sequence. Available in API version 60.0 and later.
associatedObjectField
- Field Type: string
-
Description: Required.
API name of the associated object's field whose value is used to filter the object's records. The associated object is specified in the record aggregation object.
operator
- Field Type: RecordAggregationObjectFilterOperator (enumeration of type string)
-
Description: Required.
Operator used in the filter expression.
Values are:
- Contains
- Equals
- GreaterThan
- GreaterThanOrEquals
- In
- LessThan
- LessThanOrEquals
- NotEquals
- NotIn
sequenceNumber
- Field Type: int
-
Description: Required.
Sequence number of this record aggregation object filter.
value
- Field Type: string
-
Description: Required.
Reference value with which the designated field's values are compared when the filter is applied on the associated object's records.
Declarative Metadata Sample Definition
The following is an example of a RecordAggregationDefinition component.
1<?xml version="1.0" encoding="UTF-8"?>
2<RecordAggregationDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3 <aggregateToObject>PartyRelationshipGroup</aggregateToObject>
4 <aggregateFromObject>PartyIncome</aggregateFromObject>
5 <status>Active</status>
6 <aggregationType>Record</aggregationType>
7 <description>Aggregate head of household's income to household</description>
8 <displayName>Party Income to Party Relationship Group</displayName>
9 <recordAggregationObject>
10 <associatedObject>PartyRelationshipGroup</associatedObject>
11 <masterLabel>Party Relationship Group Object</masterLabel>
12 <developerName>PartyRelationshipGroupObject</developerName>
13 <recordAggregationJoinCondition>
14 <joinField>Account</joinField>
15 <navigationSequenceNumber>1</navigationSequenceNumber>
16 <relatedJoinField>Account</relatedJoinField>
17 <relatedRecordAggregationObject>AccountContactrelationObject</relatedRecordAggregationObject>
18 <type>Intermediate</type>
19 </recordAggregationJoinCondition>
20 <recordAggregationObjectFilter>
21 <associatedObjectField>Type</associatedObjectField>
22 <operator>Equals</operator>
23 <value>Household</value>
24 <sequenceNumber>1</sequenceNumber>
25 </recordAggregationObjectFilter>
26 </recordAggregationObject>
27 <recordAggregationObject>
28 <associatedObject>AccountContactRelation</associatedObject>
29 <masterLabel>Account Contact Relation Object</masterLabel>
30 <developerName>AccountContactRelationObject</developerName>
31 <recordAggregationJoinCondition>
32 <joinField>Contact</joinField>
33 <navigationSequenceNumber>2</navigationSequenceNumber>
34 <relatedJoinField>Party</relatedJoinField>
35 <relatedRecordAggregationObject>PartyIncomeObject</relatedRecordAggregationObject>
36 <type>Intermediate</type>
37 </recordAggregationJoinCondition>
38 <recordAggregationObjectFilter>
39 <associatedObjectField>IsPrimaryMember</associatedObjectField>
40 <operator>Equals</operator>
41 <value>true</value>
42 <sequenceNumber>1</sequenceNumber>
43 </recordAggregationObjectFilter>
44 </recordAggregationObject>
45 <recordAggregationObject>
46 <associatedObject>PartyIncome</associatedObject>
47 <masterLabel>Party Income Object</masterLabel>
48 <developerName>PartyIncomeObject</developerName>
49 <filterLogic>1 AND 2</filterLogic>
50 <recordAggregationObjectFilter>
51 <associatedObjectField>IncomeFrequency</associatedObjectField>
52 <operator>Equals</operator>
53 <value>Monthly</value>
54 <sequenceNumber>1</sequenceNumber>
55 </recordAggregationObjectFilter>
56 <recordAggregationObjectFilter>
57 <associatedObjectField>IncomeStatus</associatedObjectField>
58 <operator>Equals</operator>
59 <value>Active</value>
60 <sequenceNumber>2</sequenceNumber>
61 </recordAggregationObjectFilter>
62 </recordAggregationObject>
63</RecordAggregationDefinition>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>RecordAggregationDefinition</name>
6 </types>
7 <version>60.0</version>
8</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.