+ Start a Discussion

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) 

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: