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
RICARDO PALMARICARDO PALMA 

Callout Example in a Batch Apex

Hi,
I'm having some problems with the callout Governor Limits doing callouts in a Apex Class (Error: Too many call outs) . Doing some research I found that is posible to avoid this issue with Batch Apex, but I can't find a clear example and also I found some Batch Apex Governor Limits (Call out 10) I'm not sure if I'm reading this right but 10 call out in a Batch Apex is not going to help me. 
Can someone please help me with an example.
Thanks.

 
Kiran  KurellaKiran Kurella
You can reduce the batch size to overcome this issue.

Check out the Database.executeBatch documentation for more details. You need to pass 10 as the second parameter to overcome this issue.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
 
RICARDO PALMARICARDO PALMA
Thanks for your help Kiran.