---
schema_version: "1"
id: 57d8b49bb7f0fc3b16a82cec1654430f70680cfdfc58e92e8974aa857291208c
title: Considerations for the Apex Connector Framework
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_connector_considerations.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_considerations.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0ad3ef82bff9d51123f8822220df0839937e1f86cb825d2d9e639bcfec5140a1
description: Understand the limits and considerations for creating Salesforce Connect custom adapters with the Apex Connector Framework.
---
# Considerations for the Apex Connector Framework

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

- 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.
- 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 "This example illustrates how to use callouts and OAuth to connect to an external system, which in this case is the Google Drive™ online storage service. The example also shows how to avoid failing tests from web service callouts by returning mock responses for test methods.").
- In Apex tests, use dynamic SOQL to query external objects. Tests that perform static SOQL queries of external objects fail.

#### See Also

- [Dynamic SOQL](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm "Dynamic SOQL refers to the creation of a SOQL string at run time with Apex code. Dynamic SOQL enables you to create more flexible applications. For example, you can create a search based on input from an end user or update records with varying field names.")