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
Available in: both Salesforce Classic and Lightning Experience (not for high-data-volume
external objects)
Available in: Developer Edition
Available for an extra cost
in: Enterprise, Performance, and Unlimited
Editions
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
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 This excerpt from a sample DataSource.Connection class shows the DataSource.Column named ExternalId.
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;
}
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.