Thursday, July 10, 2014

How to execute the batch apex class using developer console?

How to execute the batch apex class using developer console?

Example:

Batch Apex Class:
global class accountList implements Database.Batchable<Sobject> {

global Database.querylocator start(Database.BatchableContext BC) {
return Database.getQueryLocator([select Id, Name from Account]);
}
global void execute(Database.BatchableContext BC, list<Account> scope) {
return Database.getQueryLocator(query);
}
global void finish(Database.BatchableContext BC) {
}
}

Execute the Batch Apex Class using Developer Console using below,

accountList objTest = new accountList();
Database.executebatch(objTest);




1 comments:

Unknown said...

Currently, Android has a market share of 57% in the worldwide smart phone market. Android programming language is backed and developed by Google and Open Handset Alliance (a consortium of 84 firms)
Android Training in Chennai

Post a Comment

 
| ,