---
schema_version: "1"
id: 526ca3d1b1e1ea51c1ab43736cf092d23a0f81f717cd037df39cba8ced6bdf27
title: RelatedRecordAssocCriteria
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_relatedrecordassoccriteria.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_relatedrecordassoccriteria.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f099f1a567a1d1f71c98aba3c172d32e5390e4dc406e9668f3b1e9e7381b129b
description: Represents criteria for automatically linking records like accounts, leads, opportunities, and cases with the branches that work with them.
---
# RelatedRecordAssocCriteria

Represents criteria for automatically linking records like accounts, leads, opportunities, and cases with the branches that work with them.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## File Suffix and Directory Location

RelatedRecordAssocCriteria components have the suffix .relatedRecordAssocCriteria and are stored in the relatedRecordAssocCriteria folder.

## Version

RelatedRecordAssocCriteria components are available in API version 52.0 and later.

## Special Access Rules

To use this object, you must have the Financial Services Cloud Extension permission set.

## Fields

| Field Name | Description |
| --- | --- |
| associationHandlerApexClass | 
Field Type

string

Description

The name of a custom Apex class that handles the creation of association records for specific association criteria. This class must:

- Apply to an object that the Record Association Builder doesn't directly support
- Implement the fscwmgen.BranchManagement​AssociationHandler interface
- Return a list of Branch Unit Related Records
- Populate at least the minimum required fields in each Branch Unit Related Record:
    - BranchUnitId: Represents the current branch unit of the user or contact
    - BusinessUnitMemberId: The Banker ID of the user or contact
    - RelatedRecordId: The ID of the custom object to be related

This field is a relationship field.



 |
| associationType | 

Field Type

AssociationType (enumeration of type string)

Description

Required.

The association type. Values are:

- BranchManagement





 |
| description | 

Field Type

string

Description

A description of the association criteria.



 |
| eventType | 

Field Type

AssociationEventType (enumeration of type string)

Description

Required.

The type of reference object event that triggers creation of the association. Values are:

- Create
- Update





 |
| isProtected | 

Field Type

boolean

Description

An auto-generated value that doesn’t impact the behavior of the metadata type. The default value is false.



 |
| masterLabel | 

Field Type

string

Description

Required.

The master label of the association criteria. This internal label doesn’t get translated.



 |
| preCondition | 

Field Type

string

Description

Required.

A formula that, when true, causes a new association to be created.



 |
| referenceObject | 

Field Type

string

Description

Required.

The reference object for the association criteria.



 |
| selectedOwnerField | 

Field Type

string

Description

A field to use instead of the default Owner ID.



 |
| status | 

Field Type

AssociationStatusType (enumeration of type string)

Description

Required.

The status of the association criteria. Values are:

- Active
- Draft
- Inactive





 |

## Declarative Metadata Sample Definition

The following is an example of a RelatedRecordAssocCriteria component.

<?xml version="1.0" encoding="UTF-8"?>
<RelatedRecordAssocCriteria xmlns="http://soap.sforce.com/2006/04/metadata">
   <associationType\>BranchManagement</associationType\>
   <eventType\>Create</eventType\>
   <masterLabel\>RevenueThreeMillion</masterLabel\>
   <preCondition\>\[Account\].AnnualRevenue > 3000000</preCondition\>
   <referenceObject\>Account</referenceObject\>
   <status\>Active</status\>
</RelatedRecordAssocCriteria\>

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>RelatedRecordAssocCriteria</name\>
    </types\>
    <version\>52.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").