Newer Version Available
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.
- In Apex tests, use dynamic SOQL to query external objects. Tests that perform static SOQL queries of external objects fail.