Useful handy commands for salesforce developers

Salesforce-Handy-Commands

1. Delete the records in object from Developer console 

Delete[Select id from Account limit 10000];

2. Abort the Batch jobs from Developer console

for(AsyncApexJob job:[SELECT Id, Status FROM AsyncApexJob WHERE Status IN (‘holding’,’Queued’,’Preparing’)])
System.abortJob(job.id);

3. Delete all Scheduled jobs from salesforce developer console anonymous window

for(CronTrigger CT: [Select Id from CronTrigger Limit 100])
System.abortjob(CT.Id);

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Please check your mail for confirmation.

Leave a Comment

Your email address will not be published. Required fields are marked *

Select Language »