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
PrattyPratty 

To Fetch and process more than 50000 records.

Hello friends,

 

I want to fetch more than 50000 contacts and want to process them, but I am not able to do that.

 

How can I use batch apex for this or is there any way other than batch apex?

 

Could you please help me to get through this.

 

Thanks in advance.

 

Pratty

Best Answer chosen by Admin (Salesforce Developers) 
ForceMantis (Amit Jain)ForceMantis (Amit Jain)

Hi

 

In this batch apex is the only option that will work. You can process upto 5 Million record in one batch. Refer following salesforce article to know how to use batch apex.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm