---
schema_version: "1"
id: 26e59a08e8c6bb3238f7f3e889ab043c6abfc85ff9d9658372df13ab8375f29d
title: Set Up Salesforce Connect to Access External Data with a Custom Adapter
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/apex_adapter_setup.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.apex_adapter_setup.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: bdabad64776935e05c1e67f6fb9986793da831ac3a8b6d1ca22f4a983b14f313
description: Let users view, search, and modify any data anywhere from within their Salesforce org.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Set Up Salesforce Connect to Access External Data with a Custom Adapter

Let users view, search, and modify any data anywhere from within their Salesforce org.

### 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> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d197829e74">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To create Apex classes:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Author Apex</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To configure remote settings:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Modify All Data</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To create and edit external data sources:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To create and edit external objects:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To define or change object-level help:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To create and edit custom fields:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To edit permission sets and user profiles:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Manage Profiles and Permission Sets</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">To edit another user’s authentication settings for external
              systems:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d197829e74 ">Manage Users</td>

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

Setting up Salesforce Connect with a custom adapter involves these high-level steps.

1. [Develop the custom adapter for Salesforce Connect.](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/)
    
    Using the Apex Connector Framework, create the `DataSource.Connection` and `DataSource.Provider` classes that comprise the custom adapter.
2. [Define remote sites for Apex callouts.](https://help.salesforce.com/s/articleView?id=configuring_remoteproxy.htm&language=en_US)
    
    If the custom adapter involves any Apex callouts, define each callout endpoint as a remote site in your organization. However, you don’t need to define a remote site for a callout whose endpoint is specified as a [named credential](https://help.salesforce.com/s/articleView?id=named_credentials_about.htm&language=en_US) instead of a URL.
3. [Define an external data source of type `Salesforce Connect: Custom`.](https://help.salesforce.com/s/articleView?id=platform.apex_add_external_data_source.htm&release=264.0.0&type=5 "Connect your Salesforce org to any data anywhere via a Salesforce Connect custom adapter that you create with the Apex Connector Framework.")
    
    If you created multiple custom adapters, make sure that the external data source’s Type field specifies the correct `DataSource.Provider` class.
4. [Create the external objects.](https://help.salesforce.com/s/articleView?id=platform.external_object_define.htm&release=264.0.0&type=5 "Tables in external systems map to external objects in Salesforce, combining all your data and content for users in your org.")
    
    Perform this task only if you don’t sync to automatically create the external objects. Create an external object for each external data table that you want to access from your Salesforce org.
5. [Create help content for the external objects.](https://help.salesforce.com/s/articleView?id=customhelp_getting_started_OLH.htm&language=en_US)
    
    Create Visualforce pages that describe the external data. When your users click **Help for this Page** on an external object, they read your custom help content. Remember, your users can’t find information about the external data in Salesforce Help.
6. [Add custom fields and relationships to the external objects.](https://help.salesforce.com/s/articleView?id=adding_fields.htm&language=en_US)
    
    Create relationships between objects. If you didn’t sync to automatically create the external objects and their fields, create a custom field for each external table column that you want to access from your Salesforce org.
7. [Verify access to external object data.](https://help.salesforce.com/s/articleView?id=platform.external_object_validate.htm&release=264.0.0&type=5 "After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results. Validator is available for external objects from Apex and Odata data sources.")
    
    Check that expected user and code interactions with the external objects work, including sorting and filtering search and query results.
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_tip.png)
    
    Tip After you configure an external data source, run the validator tool on each external object to test and troubleshoot its connections. The tool tests for ID uniqueness and the ability to sort and filter results.
8. [Enable user access to external objects.](https://help.salesforce.com/s/articleView?id=platform.perm_sets_object_perms_edit.htm&type=5&language=en_US)
    
    Grant object permissions through permission sets or profiles.
9. [Enable user access to the fields on the external objects.](https://help.salesforce.com/s/articleView?id=users_profiles_fls.htm&language=en_US)
    
    Grant field permissions through permission sets or profiles.
10. If the external data source uses per-user authentication:
    1. [Let users authenticate to the external system.](https://help.salesforce.com/s/articleView?id=platform.external_permsets_profiles.htm&release=264.0.0&type=5 "For external data sources that use per-user authentication, grant users access through permission sets and profiles, so users can set up and manage their own authentication settings for accessing the external system.")
        
        Grant users access to authentication settings for the external data source through permission sets or profiles.
    2. [Set up each user’s authentication settings.](https://help.salesforce.com/s/articleView?id=platform.external_authentication.htm&release=264.0.0&type=5 "You or your administrator can set up and manage your authentication settings for external systems. With valid authentication settings, you can access external systems from within your Salesforce org.")
        
        You or your users can perform this task.
        
        ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_tip.png)
        
        Tip Train your users on how to set up their authentication settings for external systems. Make sure that they know which credentials to enter for each external system. If you’re using OAuth 2.0, test the OAuth flow for potentially confusing prompts or redirects, and train your users as needed. OAuth flows vary, depending on your external system, authentication provider, and specified scopes.

#### 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.")
- [Salesforce Platform Features Supported by Salesforce Connect](https://help.salesforce.com/s/articleView?id=platform.platform_connect_considerations.htm&release=264.0.0&type=5 "Salesforce Connect provides seamless integration with the Salesforce Platform and enables users to view, search, and modify external object data.")
- [Developer Guide: _Visualforce Developer's Guide_](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_intro.htm)
- [External Object Relationships](https://help.salesforce.com/s/articleView?id=platform.external_object_relationships.htm&release=264.0.0&type=5 "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.")