I am working on a batch class and in my start method I have a "Set" of contact Ids. I want to use this Set in the execute method of the batch job, but I am getting some errors shown below. How would I modify my code to resolve this error.
I tried modifying the Database.Batchable to Database.Batchable, but that did not work.
global class CustomerBatch implements Database.Batchable<SObject>, Database.Stateful, Database.AllowCallouts { global Set<Id> start(Database.BatchableContext BC) { Set<Id> customerIds = new Set<Id>(); Contact[] contacts = [SELECT Id FROM Contact WHERE customer_overdue__c = TRUE]; for( Contact c : contacts ) { customerIds.add(c.Id); } if( customerIds.size() > 0) { return customerIds; } return null; } global void execute(Database.BatchableContext BC, Set<Id> customerIdList) { System.debug('Customer Id List ---> ' + customerIdList); } global void finish(Database.BatchableContext BC) { } } // end batch class The errors I am getting are these:
Class CustomerBatch must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext)
Class CustomerBatch must implement the method: void Database.Batchable.execute(Database.BatchableContext, List)