---
schema_version: "1"
id: a6dfaef320b5b9e3e641d1afd42b48c15a7f0ab9f7d091f13d2a185b4e5848ac
title: Apex Connector Framework Considerations for 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_adapter_considerations_apex.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.apex_adapter_considerations_apex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 23c170bf26df2a012351004dd630efbac8002f24ca2f625644b194bbabf284b6
description: Understand the limits and considerations for creating a Salesforce Connect custom adapter with the Apex Connector Framework.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Apex Connector Framework Considerations for Salesforce Connect—Custom Adapter

Understand the limits and considerations for creating a Salesforce Connect custom adapter with the Apex Connector Framework.

### 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>

- If you change and save a `DataSource.Connection` class, resave the corresponding `DataSource.Provider` class. Otherwise, when you define the external data source, the custom adapter doesn’t appear as an option for the Type field. Also, the associated external objects’ custom tabs no longer appear in the Salesforce UI.
- DML operations aren’t allowed in the Apex code that comprises the custom adapter.
- Apex methods with the `future` annotation aren't supported in an Apex custom adapter. When a future method is invoked, the external callout could cause an error in Salesforce.
- Make sure that you understand the limits of the external system’s APIs. For example, some external systems accept only requests for up to 40 rows.
- Apex data type limitations:
    - Double—The value loses precision beyond 18 significant digits. For higher precision, use decimals instead of doubles.
    - String—If the length is greater than 255 characters, the string is mapped to a long text area field in Salesforce.
- Custom adapters for Salesforce Connect are subject to the same limitations as any other Apex code. For example:
    - All Apex governor limits apply.
    - Test methods don’t support web service callouts. Tests that perform web service callouts fail. For an example that shows how to avoid these failing tests by returning mock responses, see [Google Drive™ Custom Adapter for Salesforce Connect](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_example_google_drive.htm) .
- In Apex tests, use dynamic SOQL to query external objects. Tests that perform static SOQL queries of external objects fail.

#### 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.")
- [External Objects in Salesforce Connect](https://help.salesforce.com/s/articleView?id=platform.platform_connect_considerations_compatibility.htm&release=264.0.0&type=5 "External objects behave similar to custom objects except that they map to data stored outside Salesforce in an external data source. Each external object maps to a data table, and the object fields map to accessible table columns.")
- [_Apex Developer Guide_: Primitive Data Types](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_primitives.htm)
- [_Apex Developer Guide_: Execution Governors and Limits](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm)
- [_Apex Developer Guide_: Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm)
- [_Apex Developer Guide_: Google Drive™ Custom Adapter for Salesforce Connect](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_example_google_drive.htm)
- [_Apex Developer Guide_: Dymamic SOQL](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm)