【发布时间】:2018-05-11 14:24:38
【问题描述】:
我正在编写 Apex 测试。
我收到一个编译错误,提示 DML operation Delete not allowed on List
AsyncApexJob[] currentAsyncJobs = [SELECT Id FROM AsyncApexJob];
delete currentAsyncJobs;
我正在尝试删除所有 AsyncApexJobs,以便稍后在执行我正在测试的类后检查是否已将正确数量的作业排入队列。 IE。
List<AsyncApexJob> asyncJobList = [SELECT Id FROM AsyncApexJob];
System.assertEquals(2, asyncJobList.size(), 'Two jobs should have been enqueued');
我不知道我做错了什么。这是documentation
我正在使用带有 maven mate 的 atom 编辑器。
【问题讨论】:
标签: salesforce apex