+ Start a Discussion
Radhe Shyam.Radhe Shyam. 

Get more than 2000 records in REST Get call

Hello Team, 

I am performing some operations in jQuery where i am making connection with salesforce.
From Salesforce, i am trying to get the records from Account object by passing query from jQuery Code.

Problem is: I am getting only 2000 records. But i need all records.

How to do this, please guide.

Thanks
Radhe S
NagendraNagendra (Salesforce Developers) 
Hi Radhe,

Your search might probably be being paginated.

At the end of the response, you should get a field named nextRecordsUrl

Part of the result is a nextRecordsUrl property which when you do a GET on it, will return you the next chunk of the results. See the section on the query https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/#StartTopic=Content/resources_query.htm in the rest API docs.

Hope this will help you.

Kindly mark this as solved if it's resolved.

Thanks,
Nagendra