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
lopezclopezc 

Question about 'future method cannot be called from a future method'

Hi all,

 

I have a problem with @future annotations. I need to do to different call outs when a new Lead is created, the first call out is to a webservice(webservice1) that returns a parameter needed for the callout to the webservice. I know that Future method cannot be called from a future method... what is the best solution to handle this?

 

Thanks

dev_forcedev_force

Write a new web service that calls your 2 exising web services.

 

Call the new web service from salesforce.

 

?

lopezclopezc
The first webservice give me a parameter that I need on the second service call. Future methods don't return values so I couldn't get the parameter from the first one to send it to the second one..
dev_forcedev_force
Are these web services hosted outside of salesforce ? i.e. your own server?
lopezclopezc
Yes, both are. The first one is my own server and the second one is ExactTarget. So what I am doing is getting some info from my server and sending an email to a client using ExactTarget API