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
| 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 |
- If you change and save a
DataSource.Connectionclass, resave the correspondingDataSource.Providerclass. 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
futureannotation 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 .
- 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
- External Objects in Salesforce Connect
- Apex Developer Guide: Primitive Data Types
- Apex Developer Guide: Execution Governors and Limits
- Apex Developer Guide: Callout Limits and Limitations
- Apex Developer Guide: Google Drive™ Custom Adapter for Salesforce Connect
- Apex Developer Guide: Dymamic SOQL
Did this article solve your issue?
Let us know so we can improve!

