此时显示错误
请尽快提供帮助。有什么建议
提前致谢
当我评论该部分时,一切正常。当我取消注释时,我收到错误。我不知道为什么会这样
请帮忙
该消息是不言自明的:不要使用另一个异步方法中的 @future 方法。 另一种方法是对 @future 方法进行排队。
改变:
@future void FutureMethod( String anyParam ) {
[@future code]
}
致:
class FutureClass implements Queueable {
String localParam;
public FutureClass( String strParam ) {
localParam = strParam;
}
public void execute( QueueableContext qc ) {
[adapted @future code]
}
}
电话是:
System.enqueueJob(new FutureClass( strParam );