You need to sign in to do that
Don't have an account?
NANDHINI k 9
whether my program is correct or wrong?
global class UpdateTheValue implements Database.Batchable<Employee_Detail__c>
{
global final String Query;
global integer Available_Leave__c;
global SummarizeAccountTotal(String q)
{
Query=q;
}
global Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC,List<Employee_Detail__c> scope){
for(Employee_Detail__c s : scope)
{
Available_Leave__c= Integer.valueOf(s.get('Available_Leave__c'))+4;
}
update scope;
}
global void finish(Database.BatchableContext BC){
}
}
Error:class UpdateTheValue must be implement method:system.iterable Database.Batchable.start.(Database.batchablecontext)
{
global final String Query;
global integer Available_Leave__c;
global SummarizeAccountTotal(String q)
{
Query=q;
}
global Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC,List<Employee_Detail__c> scope){
for(Employee_Detail__c s : scope)
{
Available_Leave__c= Integer.valueOf(s.get('Available_Leave__c'))+4;
}
update scope;
}
global void finish(Database.BatchableContext BC){
}
}
Error:class UpdateTheValue must be implement method:system.iterable Database.Batchable.start.(Database.batchablecontext)
Prady01
Hi Nanshini. Please find the below sample batch class, Hope this helps!