You need to sign in to do that
Don't have an account?
Yossi 4
HTTP from Schedule Apex Class with Nested @future
<BS"D>
Hello,
I am trying to run a scheduled apex class that
1. Collects information through an http request
2. Upsert the collected contacts into the Contacts object
Using the @future(callout=true) token, I am able to run the first step, getting the info from an API. However, since contacts have a trigger with an @future token too, I am getting an error regarding nested @future . Any ideas? Maybe the @future token is not the only way to enable callouts from a scheduled apex class?
Hello,
I am trying to run a scheduled apex class that
1. Collects information through an http request
2. Upsert the collected contacts into the Contacts object
Using the @future(callout=true) token, I am able to run the first step, getting the info from an API. However, since contacts have a trigger with an @future token too, I am getting an error regarding nested @future . Any ideas? Maybe the @future token is not the only way to enable callouts from a scheduled apex class?
Shashank (Salesforce Developers)
Here's a workaround that might help: http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/