Created
March 17, 2014 22:48
-
-
Save dcarroll/9609997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class CleanUpRecords implements Database.Batchable<sObject> { | |
global final String query; | |
global CleanUpRecords(String q) { | |
query = q; | |
} | |
global Database.QueryLocator start(Database.BatchableContext bc) { | |
return Database.getQueryLocator(query); | |
} | |
global void execute(Database.BatchableContext BC, List<sObject> scope) { | |
delete scope; | |
} | |
global void finish(Database.BatchableContext BC) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment