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
George Laird 55George Laird 55 

Help! Need to make over 40 callouts in a batch job

Ok, here's one for you experts out there.  I have to make a callout to get leads from a third party.  The problem is that I have to pass a parent ID to this GET method that will retun the leads for that parent ID.  The problem is that I have to make a seperate call for each parent ID.  I know, it's silly but they don't have a way to just pass an array of all the parentIDs and get back a list of leads in one call.  

So, the company wants this job to run at night and get all the leads from all the parentIDs.   I know from the past that I can't have more than like 10 callouts in a transaction or something like that. 

So, how can I do this?   How can I create a batch job that makes a seperate callout for each parentID?   

Thank you in advance!
Best Answer chosen by George Laird 55
AbhishekAbhishek (Salesforce Developers) 
Try the workaround as mentioned in the below blog (https://salesforce.stackexchange.com/questions/4969/workaround-for-the-10-web-service-callout-limit-in-apex),

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Try the workaround as mentioned in the below blog (https://salesforce.stackexchange.com/questions/4969/workaround-for-the-10-web-service-callout-limit-in-apex),

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.
This was selected as the best answer
George Laird 55George Laird 55
Awesome! Thanks!