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
kabukabu 

@HttpGet fetching more than 50000 records

Hi,
How can I pass to the Rest Client all the contacts/Accounts  thro' REST API using @HTTPGet  if there are more than 50000 records?.

 
Ajay K DubediAjay K Dubedi
Hi Kabu,

you cannot query all the records in single time as salesforce has a limit of 50000 query rows.
You can try thw workaround solution by applying limit on the get request and keep adding the records to a map of id vs contact and then fetch the records from the map using for loop.just keep in mind the governor limits and set your limit values.

Thanks
salesforce mesalesforce me
Hi Kabu check this once...


https://github.com/salesforce-um-bhavah/parsecsvinsalesforce

u have any doughts ping me...