global class BatchableSample implements Database.Batchable, Schedulable { global Database.Querylocator start(Database.BatchableContext context) { // TO-DO: construct the actual query return Database.getQuerylocator([Select Id From Account Where CreatedDate = TODAY]); } global void execute(Database.BatchableContext context, Listscope) { } global void finish(Database.BatchableContext context) { }
// schedulable global void execute(SchedulableContext context) { } }
There must be a very good reason why we complicated our lives with all these technologies ... arguably that is freedom for something. Freedom might be a right but it is never free; so let me demonstrate how I earned it.
Tuesday, August 5, 2014
Skeleton code for Batchable/Schedulable classes
I wish Force.com IDE had a quick option to generate a skeleton class for Batchable classes. It has one for test classes, so why not this one? For now I just paste in my own skeleton code to save typing the same stuff every time.
Labels:
Batchable,
force.com,
IDE,
Salesforce.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment