You need to sign in to do that
Don't have an account?
Das M
Compile Error: Class must implement the global interface method: Iterable
Hi, I am getting followinng error whilt I try to save this Class. Could someone help to fix this ?
Error: Compile Error: deleteInventory: Class must implement the global interface method: Iterable<Inventory__c> start(Database.BatchableContext) from Database.Batchable<Inventory__c> at line 1 column 14
Error: Compile Error: deleteInventory: Class must implement the global interface method: Iterable<Inventory__c> start(Database.BatchableContext) from Database.Batchable<Inventory__c> at line 1 column 14
global class deleteInventory implements Database.Batchable<Inventory__c>{ global final String Query; global deleteInventory(String q){ Query=q; } global Database.QueryLocator start(Database.BatchableContext BC){ return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC,List<Inventory__c> scope){ delete scope; } global void finish(Database.BatchableContext BC){ // Get the ID of the AsyncApexJob representing this batch job } }
[1] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm#apex_batch_iterable