Newer Version Available

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

QueryLocator

In the QueryResult object returned by the query() call, queryLocator contains a value that you use in the subsequent queryMore() call. Note the following guidelines:

  • Use a given queryLocator value only one time. When you pass it in a queryMore() call, the API returns a new queryLocator in the QueryResult.
  • QueryLocator objects expire automatically after 15 minutes of inactivity.
  • A user can have up to 10 query cursors open at a time. If 10 QueryLocator cursors are open when a client application, logged in as the same user, attempts to open a new one, then the oldest of the 10 cursors is released. If the client application attempts to open the released query cursor, an error results.

Cursor limits for different Lightning Platform features are tracked separately. For example, you can have 10 SOAP API query cursors, 10 Metadata API cursors, and 50 Apex query cursors open at the same time.

Note

A QueryLocator represents a server-side cursor.