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

Cloud Swarm @future trigger on Leads

We were testing out Cloud Swarm in our sandbox. We have a batch process that runs daily to update the leads. Our batch process is failing because a @future method cannot be called from a batch process. Can the trigger be changed to not use a future call if it's running in a batch? Otherwise we cannot use it.


10:02:29.137 (23137852000)|USER_DEBUG|[544]|DEBUG|Error=cloudswarm.leadSwarm: execution of AfterUpdate

caused by: System.AsyncException: Future method cannot be called from a future or batch method: cloudswarm.SwarmHelper.evaluateLeadRulesFuture(LIST<Id>)



The Cloud Swarm TeamThe Cloud Swarm Team



If you have the Unmanaged Package installed, you can just remove the @future annotation in the Swarm Helper class.  This annotation is there to relax some of the governor limits but you will likely be able to use Cloud Swarm just fine withou it.


~ The Cloud Swarm Team