Skip to main content
2 of 4
added 45 characters in body
Pranay Jaiswal
  • 36.4k
  • 17
  • 79
  • 138

So you can do at max 100 callouts in a transaction.

As I can see you are Setting batch scope as 50. Database.executebatch(objTest, 50);

As you say, for each Account you will be making 12 Folder ie 12 Callouts.

So in each iteration of execute of Batch, you need 12(Folder) *50 (Account) = 600 callouts.

As we cannot do 600 Callouts in execute, you need to change the scope of your batch to the optimal value.

100(Callout)/12(Folder) = 8.3

that means your scope will be 8.

thus the fix will be:

AccountBoxFolderCreationBatch objTest = new AccountBoxFolderCreationBatch();
Database.executebatch(objTest, 8);

Src: Callout limits

Pranay Jaiswal
  • 36.4k
  • 17
  • 79
  • 138