Newer Version Available

This content describes an older version of this product. View Latest

External Objects

Special behaviors and limitations apply to queryAll() and queryMore() calls on external data.

queryAll()

Because Salesforce doesn’t track changes to external data, the queryAll() call behaves exactly the same as query() for external objects.

queryMore()

To connect to an external data source, Lightning Connect uses the Open Data Protocol (OData) version 2.0. To do client-side paging through the remote data set, queryMore() uses the $top and $skip system query options in OData calls. This is similar to using LIMIT and OFFSET clauses to page through a result set.

Querying a standard or custom object gathers all the IDs and creates a server-side cursor to page through. When querying external objects, each queryMore() call results in a new OData callout to the external data source. If the external data is modified between queryMore() calls, you might get an unexpected QueryResult.

We recommend that you filter your queries of external data to return fewer rows than the default batch size of 500 rows. We also recommend that you avoid using queryMore() calls on external data that frequently changes.

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.