As we have 10 callout governor Limit in each execution . So I can query 100 records in start and execute the batch class with batch size as 1 and do 10 callout for each record . So total I can query 100*10 . Plus 10 callouts of start method and 10 for finish .

Is this possible ?

  • I tried this and it is possible. – Piyush Kalra Sep 12 '14 at 10:27


Total number of callouts (HTTP requests or Web services calls) in a transaction

governor limit is 10 and each execute call made by the Batchable mechanism is a separate transaction.

The maximum number of records that can be returned from the start method of a Batchable providing a QueryLocator is used is 50,000,000.

So you can tune the batch size to stay within the callout limit in each execute and you can in theory process up to 50,000,000 records...

  • Have you practically tried this? I doubt that you can call more than 10 callouts in batch context. – AtulRajguru9 Sep 12 '14 at 13:22
  • @AtulRajguru9 Agreed. I'm saying if its 1 callout per record the batch size could be set to 10 but if its 10 callouts per record the batch size would have to be set to 1. The question was phrased a little confusingly and 10 callouts per record is a pretty extreme requirement so I didn't want to repeat that in the answer. – Keith C Sep 12 '14 at 14:02

you can use more than 10 callout in batch

  • Would you please elaborate and provide a reference to the Apex documentation to support your answer, thus providing a more complete answer? Thank you. – crmprogdev Sep 12 '14 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.