0

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 ?

1
  • I tried this and it is possible. Commented Sep 12, 2014 at 10:27

2 Answers 2

1

The:

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...

2
  • Have you practically tried this? I doubt that you can call more than 10 callouts in batch context. Commented Sep 12, 2014 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
    Commented Sep 12, 2014 at 14:02
-1

you can use more than 10 callout in batch

1
  • 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
    Commented Sep 12, 2014 at 13:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .