Professional Documents
Culture Documents
1000 Account
1000 Account
1000 Account
Batchable<SObject> {
public Database.QueryLocator start(Database.BatchableContext context) {
return Database.getQueryLocator('SELECT Id , phone, Site FROM Account');
}
Integer counter = 1;
accountsToCreate.add(newAccount);
counter++;
}
try {
insert accountsToCreate;
} catch (Exception e) {
System.debug('Error occurred: ' + e.getMessage());
}
}
//for execute
//CreateAccountsBatch batchJob = new CreateAccountsBatch();
//Database.executeBatch(batchJob, 1000); explain to me this code by detail