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
symantecAPsymantecAP 

Working With trigger

Hi All 

 

Here is the case.

 

If my SOQL query is returning 70,000 records..( i.e hitting governor limits) How do I process the query using list in batch . Or using List. Please explain me in brief. I thank you in advance

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

If you have this many records I'd say you need to use batch apex.  You'd specify the query as a query locator, and the platform will call your execute code with up to 200 records at a time.

 

There's full details on batch apex at:

 

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