其他分享
首页 > 其他分享> > Future method cannot be called from a future or batch method

Future method cannot be called from a future or batch method

作者:互联网

我们知道future方法在batch或者future方法中被调用,会报如下的错误:
caused by: System.AsyncException: Future method cannot be called from a future or batch method.

但有时候,因为batch触发了trigger,而trigger调用了future,也会出现同样的错误。

那如何解决呢?

有一种思路就是用Salesforce提供的Platform Event.

标签:cannot,batch,method,trigger,future,called,Future
来源: https://www.cnblogs.com/salesforcechina/p/15603537.html