---
schema_version: "1"
id: c4235cd82b024902ed40c5e3d6fbd74692e95b5195c9e4b1e53c3b20cb812b93
title: External Object Relationships
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/external_object_relationships.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.external_object_relationships.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 05ab8309f8ec36b8cc760c7319709db49214ad68af3a46abe7358f97bd56fb45
description: "External objects support standard lookup relationships, which use the 18-character Salesforce record IDs to associate related records with each other. However, data that’s stored outside your Salesforce org often doesn’t contain those record IDs. Therefore, two special types of lookup relationships are available for external objects: external lookups and indirect lookups."
products:
  - Salesforce Platform
  - Security
release: "264"
---
# External Object Relationships

External objects support standard lookup relationships, which use the 18-character Salesforce record IDs to associate related records with each other. However, data that’s stored outside your Salesforce org often doesn’t contain those record IDs. Therefore, two special types of lookup relationships are available for external objects: external lookups and indirect lookups.

### 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: both Salesforce Classic
            and Lightning Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Salesforce Connect is available in: <strong>Developer</strong> Edition and for an extra
              cost in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions</p>
            <p><span id="external_object_relationships__files_connect_cloud_editions"><a name="external_object_relationships__files_connect_cloud_editions"><!-- --></a>Files Connect for cloud-based external data
                sources is available in: <strong>Professional</strong>, <strong>Enterprise</strong>,
                <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong>
                Editions</span></p>
            <p style="margin-bottom:0;">Federated Search is available in: <strong>Enterprise</strong>,
              <strong>Professional</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions
            </p>
          </td>

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

External lookups and indirect lookups compare a specific field’s values on the parent object to the relationship field’s values on the child object. When values match, the records are related to each other. External lookups and indirect lookups to external objects that have composite keys aren't supported.

To create an external object relationship, create a custom field on the child object with one of the following field types. If the child is an external object, you can instead change the field type of an existing custom field to one of the following.

- Lookup Relationship
- External Lookup Relationship
- Indirect Lookup Relationship

This table summarizes the types of relationships that are available to external objects.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note Federated Search supports only external lookup relationships, and the Federated Search external object is always the parent.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:22.22222222222222%">
        <col style="width:22.22222222222222%">
        <col style="width:22.22222222222222%">
        <col style="width:33.33333333333333%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d131665e131">Relationship</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d131665e134">Allowed Child Objects</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d131665e137">Allowed Parent Objects</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d131665e140">Parent Field for Matching Records</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Relationship" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e131 ">Lookup</td>

          <td data-label="Allowed Child Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e134 ">
            <p>Standard</p>
            <p>Custom</p>
            <p style="margin-bottom:0;">External</p>
          </td>

          <td data-label="Allowed Parent Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e137 ">
            <p>Standard</p>
            <p style="margin-bottom:0;">Custom</p>
          </td>

          <td data-label="Parent Field for Matching Records" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e140 ">The 18-character Salesforce record ID</td>

        </tr>
        <tr class="">
          <td data-label="Relationship" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e131 ">External lookup</td>

          <td data-label="Allowed Child Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e134 ">
            <p>Standard</p>
            <p>Custom</p>
            <p style="margin-bottom:0;">External</p>
          </td>

          <td data-label="Allowed Parent Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e137 ">External</td>

          <td data-label="Parent Field for Matching Records" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e140 ">The External ID standard field</td>

        </tr>
        <tr class="">
          <td data-label="Relationship" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e131 ">Indirect lookup</td>

          <td data-label="Allowed Child Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e134 ">External</td>

          <td data-label="Allowed Parent Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e137 ">
            <p>Standard</p>
            <p style="margin-bottom:0;">Custom</p>
          </td>

          <td data-label="Parent Field for Matching Records" class="slds-cell-wrap" style="vertical-align:top;" headers="d131665e140 ">You select a custom field with the <code>External
                ID</code> and <code>Unique</code> attributes</td>

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

- **[Lookup Relationship Fields on External Objects](https://help.salesforce.com/s/articleView?id=platform.external_object_lookup_relationships.htm&release=264.0.0&type=5)**  
    Use a lookup relationship when the external data includes a column that identifies related Salesforce records by their 18-character IDs.
- **[External Lookup Relationship Fields on External Objects](https://help.salesforce.com/s/articleView?id=platform.external_object_external_lookup_relationships.htm&release=264.0.0&type=5)**  
    Use an external lookup relationship when the parent is an external object.
- **[Indirect Lookup Relationship Fields on External Objects](https://help.salesforce.com/s/articleView?id=platform.external_object_indirect_lookup_relationships.htm&release=264.0.0&type=5)**  
    Use an indirect lookup relationship when the external data doesn’t include Salesforce record IDs.

#### See Also

- [Create Custom Fields](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm&type=5&language=en_US)
- [Change the Data Type of a Custom Field](https://help.salesforce.com/s/articleView?id=platform.customize_fieldtype.htm&release=264.0.0&type=5 "You can modify the data type of a custom field. For example, you can change a field from Text to Text Area (Long).")
- [Considerations for Object Relationships](https://help.salesforce.com/s/articleView?id=platform.relationships_considerations.htm&release=264.0.0&type=5 "Review these considerations before creating relationships between objects.")
- [Include a Files Connect Data Source in Global Search](https://help.salesforce.com/s/articleView?id=experience.admin_files_connect_search.htm&type=5&language=en_US)
- [Object Relationships Overview](https://help.salesforce.com/s/articleView?id=platform.overview_of_custom_object_relationships.htm&release=264.0.0&type=5 "Create relationships to link objects with each other, so that when your users view records, they can also see related data. For example, link a custom object called Bugs to cases to track product defects that are associated with customer cases.")