function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
global class InvoiceBatch implements Database.Batchable<sObject>,Database.Stateful{ global integer count = 0; global Database.QueryLocator start(Database.BatchableContext BC){ String query = 'Select Id,Name from Invoice__c'; return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC, List<sObject> scope){ for(sobject s : scope){ count++; //Process records } } global void finish(Database.BatchableContext BC){ System.debug('count:' + count); } }
Thx