I am trying to write a batch apex class to pass a number of field values to new fields, all on the account object. However I am having trouble compiling my class.
Error: Class MigrateCreditSafe must implement the method:
System.Iterable<Account>
Database.Batchable<Account>.start(Database.BatchableContext)
global class MigrateCreditSafe implements Database.Batchable<Account> {
global MigrateCreditSafe(){}
global Database.QueryLocator start(Database.BatchableContext bc) {
return Database.getQueryLocator(
'SELECT Id, bottomline_creditSafeScore__c, bottomline__creditSafeCompanyType__c, bottomline__creditSafeScoreDescription__c, bottomline__creditSafeLastRefreshed__c, ' +
'bottomline__creditSafeLimit__c, bluetahiti_creditSafeScore__c, bluetahiti__creditSafeCompanyType__c, ' +
'bluetahiti__creditSafeScoreDescription__c, bluetahiti__creditSafeLastRefreshed__c, ' +
'bluetahiti__creditSafeLimit__c FROM Account WHERE bottomline__creditSafeCompanyType__c != null'
);
}
global void execute(Database.BatchableContext bc, List<Account> scope) {
List<Account> accounts = new List<Account>();
for(Account account : scope){
bottomline_creditSafeScore__c = bluetahiti_creditSafeScore__c;
bottomline__creditSafeCompanyType__c = bluetahiti__creditSafeCompanyType__c;
bottomline__creditSafeScoreDescription__c = bluetahiti__creditSafeScoreDescription__c;
bottomline__creditSafeLastRefreshed__c = bluetahiti__creditSafeLastRefreshed__c;
bottomline__creditSafeLimit__c = bluetahiti__creditSafeLimit__c;
// add accounts to list to be updated
accounts.add;
}
update accounts;
}
global void finish(Database.BatchableContext bc) {}
}
accounts.add;
line.