Special behaviors and limitations apply to queryAll() and queryMore() calls on external data.
|Available in: both Salesforce Classic and Lightning Experience|
|Available in: Developer Edition|
Available for an extra cost in: Enterprise, Performance, and Unlimited Editions
- Because Salesforce doesn’t track changes to external data, queryAll() behaves the same as query() for external objects.
- It's common for Salesforce Connect queries of external data to have a large result set that's broken into smaller batches or pages.
When querying external objects, Salesforce Connect accesses the external data in real time via Web service callouts. Each queryMore() call results in a Web service callout. The batch boundaries and page sizes depend on your adapter and how you set up the external data source.
We recommend the following:
- When possible, avoid paging by filtering your queries of external objects to return fewer rows than the batch size, which by default is 500 rows. Remember, obtaining each batch requires a queryMore() call, which results in a Web service callout.
- If the external data frequently changes, avoid using queryMore() calls. If the external data is modified between queryMore() calls, you can get an unexpected QueryResult.
If the primary or “driving” object for a SELECT statement is an external object, queryMore() supports only that primary object and doesn’t support subqueries.