You need to sign in to do that
Don't have an account?
Asok
System.AsyncException: Future method cannot be called from a future method: cloudswarm.
Dear All,
I have cloudswarm installed last week. After that, I noticed one of my batch code failed with the below error message.
Update failed. First exception on row 0 with id 00k3000000GhuidAAB; first error: CANNOT_INSERT_UPDATE_ACTIVATE_
ENTITY, cloudswarm.opptySwarm: execution of AfterUpdate
caused by: System.AsyncException: Future method cannot be called from a future method: cloudswarm.SwarmHelper.evaluateOpptyRules(LIST<Id>)
(cloudswarm): []
caused by: System.AsyncException: Future method cannot be called from a future method: cloudswarm.SwarmHelper.evaluateOpptyRules(LIST<Id>)
(cloudswarm): []
Kindly help me in fixing the issue.
It looks like you're having this issue because the Cloud Swarm trigger runs, then another trigger set up is making a change to the record which calls the Cloud Swarm trigger again, etc., recursively.
See this article on how to prevent recursive future method calls:
http://blog.jeffdouglas.com/2009/10/02/preventing-recursive-future-method-calls-in-salesforce/
~ The Cloud Swarm Team
I'm having the same problem with Cloud Swarm, but I think it is because I have another process that calls a future method that updates an Opportunity. Here is the error message in my future method code:
From what I can determine, I have a Quote trigger that is calling a future method to update the related Opportunities. it looks like Cloud swarm has an after update trigger to determine if the Opportunity meets any rules and if so, calls a future method to do something with the follows.
If that is true, does this mean using CloudSwarm for Opportunities prevent me from running any async opportunity updates? Seems like a big limitation if that is true.
Hi DevNV,
You can make Cloud Swarm a synchronous method by removing the @future annotation on the class in the Unmanaged version. That should provide a workaround for your issue with it being called by another asynchronous method.
~ The Cloud Swarm Team
Thanks for your quick response. If we are already using the Managed Package - do we need to uninstall first, and will we lose all the data/settings/rules in that process?
That's correct. With Enterprise or Unlimited Edition can use the Data Loader to Export your rules, uninstall the Managed package, install the Unmanaged pacakge, and re-Import the rules with the Data Loader. If you haven't got a lot of settings, it might just be easier to manually re-enter them instead of the export/import.
~ The Cloud Swarm Team