I have This Code -->
global class ExpiryDateBatchCls implements Database.Batchable<sObject>{
global final DateTime startDate;
global final DateTime EndDate;
global ExpiryDateBatchCls(dateTime sd,dateTime ed){
StartDate=sd;
EndDate=ed;
}
global Database.querylocator start(Database.BatchableContext BC){
List<IP__Renewal__c> renewals = new List<IP__Renewal__c>([SELECT Id FROM IP__Renewal__c WHERE IP__IP_Right__r.IP__AppDate__c!=null and IP__IP_Right__r.Split_Entity__c='BIIB' and IP__IP_Right__r.Annuity_Responsible__c='YES' and IP__IP_Right__r.Annuity_Eligible__c ='YES' and IP__IP_Right__r.IP__IPR_Type__c in ('Patent','Design','Utility Model','Defensive Publication') and
IP__Due_Date__c >=: startDate AND IP__Due_Date__c <=:endDate]);
return Database.getQueryLocator(renewals);
}
global void execute(Database.BatchableContext bc ){
// renewals = bc.
for(IP__Renewal__c renewal : renewals){
System.debug(renewal.Id);
Database.executeBatch(new BatchQuotesRequest(startDate, renewal.Id));
}
}
global void finish(Database.BatchableContext bc){
}
}
This show Error
Variable does not exist: renewals