function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Error when trying to query more than 2000 records

I query data which sometimes exceeds 2000 and that happens I receive an error message from the API stating error message = 2000

Is there a limiter that does not allow me to work with more 2000 records and how can I workaround this?

thank you.

The logic to loop through all the records is descrbed in the documentation, but this involves the querymore( )  API call.
Am I still limited to 2000 records? Even though I use the queryMore method???
no, the query can potentially have millions of records, but you work with them in (upto) 2000 row chunks.
Mysti, Developer DocumentationMysti, Developer Documentation


A single batch cannot be more than 2,000 records. queryMore works with query to process batches.

See these topics in the API developer guide:

Mysti Berry
Lead Technical Writer,