---
schema_version: "1"
id: 0e24007cee3a7f8d898b29bacff1ab81a612ec0eabe8e7394d8a2c149d8a5af7
title: Custom Metadata Relationships
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/custommetadatatypes_relationships.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_relationships.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ab5481eb648c91285e8eef3930a239321d1f9fdee142790b1b21fa7d54b65390
description: Create relationships between custom metadata types, entity definitions, field definitions, or entity particles. Use relationships rather than text fields to directly reference objects, simplify your Apex code, and enforce referential integrity, for example, when packaging custom metadata types.
products:
  - Salesforce Platform
release: "264"
---
# Custom Metadata Relationships

Create relationships between custom metadata types, entity definitions, field definitions, or entity particles. Use relationships rather than text fields to directly reference objects, simplify your Apex code, and enforce referential integrity, for example, when packaging custom metadata types.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
      <colgroup>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic and Lightning Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and
              <strong>Developer</strong> Editions
            </p>
            <p style="margin-bottom:0;">You can create, edit, and delete custom metadata type
              records from installed packages in: <strong>Group</strong> and <strong>Professional</strong>
              Editions</p>
          </td>

        </tr>
      </tbody>
    </table>

Like other relationships in Salesforce, custom metadata relationships have a particular domain. When you create a metadata relationship field on a type, you can relate it to another custom metadata type, an entity definition, a field definition, or an entity particle.

- **[Custom Metadata Relationship Considerations](https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_relationships_limits.htm&release=264.0.0&type=5)**  
    Before you start using custom metadata relationships, keep these considerations in mind.
- **[Create a Relationship to a Custom Metadata Type or Entity Definition](https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_relationships_create.htm&release=264.0.0&type=5)**  
    Create direct relationships to a custom metadata type or entity definition.
- **[Create a Relationship to a Field Definition or Entity Particle](https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_relationships_field_particle.htm&release=264.0.0&type=5)**  
    Create direct relationships to field definitions or entity particles.
- **[View Filtering on Metadata Relationship Fields](https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_rel_view_filter.htm&release=264.0.0&type=5)**  
    When you create a view and filter on a relationship field of a custom metadata type, use these guidelines for entering the filter values.