You need to sign in to do that
Don't have an account?
Knowledgeseeker
I'm getting too many DML Statements 151 error when trying to execute this code in the Developer Console...
for (CronTrigger cjob : [SELECT Id FROM CronTrigger WHERE CronJobDetail.JobType != '7'AND CronJobDetail.JobType != '4' AND CronJobDetail.JobType != '9']){System.abortJob(cjob .Id);
}
}
Knowledgeseeker
This is supposed to Unschedule/remove scheduled Reports / Dashboards etc.
Chris Byrom
I would assume that you have more than 100 things that are being aborted. Presumably this is what is causing the DML error. You might try limiting your query to 100 items and see if that solves the error, then run your code multiple times as needed to clear up the jobs.