---
schema_version: "1"
id: c864e99651040d2ce23d8d2ae278396d5ec99d306474a9dec5894c040bd5a5d7
title: External IDs for External Objects in Salesforce Connect—Custom Adapter
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/apex_external_id.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.apex_external_id.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1fbc8b04d1f96324f0e29944387f175abbc231ac6d0a2198015f5a65f30dc62a
description: When you access external data with a custom adapter for Salesforce Connect, the values of the External ID standard field on an external object come from the DataSource.Column named ExternalId.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# External IDs for External Objects in Salesforce Connect—Custom Adapter

When you access external data with a custom adapter for Salesforce Connect, the values of the External ID standard field on an external object come from the `DataSource.Column` named `ExternalId`.

### 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 (not for high-data-volume
            external objects)</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Available in: <strong>Developer</strong> Edition</p>
            <p style="margin-bottom:0;">Available for an extra cost
              in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong>
              Editions</p>
          </td>

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

Each external object has an External ID standard field. Its values uniquely identify each external object record in your org. When the external object is the parent in an external lookup relationship, the External ID standard field is used to identify the child records.

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

Important

- The custom adapter’s Apex code must declare the `DataSource.Column` named `ExternalId` and provide its values.
- Don’t use sensitive data as the values of the External ID standard field or fields designated as name fields, because Salesforce sometimes stores those values.
    - External lookup relationship fields on child records store and display the External ID values of the parent records.
    - For internal use only, Salesforce stores the External ID value of each row that’s retrieved from the external system. This behavior doesn’t apply to external objects that are associated with high-data-volume external data sources.

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

Example This excerpt from a sample `DataSource.Connection` class shows the `DataSource.Column` named `ExternalId`.

```java

    override global List<DataSource.Table> sync() {
        List<DataSource.Table> tables =
        new List<DataSource.Table>();
    List<DataSource.Column> columns;
    columns = new List<DataSource.Column>();
    columns.add(DataSource.Column.text('title', 255));
    columns.add(DataSource.Column.text('description',255));
    columns.add(DataSource.Column.text('createdDate',255));
    columns.add(DataSource.Column.text('modifiedDate',255));
    columns.add(DataSource.Column.url('selfLink'));
    columns.add(DataSource.Column.url('DisplayUrl'));
    columns.add(DataSource.Column.text('ExternalId',255));
    tables.add(DataSource.Table.get('googleDrive','title',
        columns));
    return tables;
    }
```

#### See Also

- [Custom Adapter for Salesforce Connect](https://help.salesforce.com/s/articleView?id=platform.apex_adapter_about.htm&release=264.0.0&type=5 "Connect to any data anywhere for a complete view of your business. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect.")
- [_Apex Developer Guide_](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/)