You need to sign in to do that
Don't have an account?
Priya Aakanksha
birthdays emails should be automatically triggered to the customer global class BirthdayNotificationBatchClass implements Database.Batchable<sObject>,schedulable{ global Database.querylocator start(Database.BatchableContext bc){ String query= 'SELECT
This is my batch class so that i was facing an error regarding the trigger firing like
Class BirthdayNotificationBatchClass must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>)
Class BirthdayNotificationBatchClass must implement the method: void System.Schedulable.execute(System.SchedulableContext)
Please help me out from this
Class BirthdayNotificationBatchClass must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>)
Class BirthdayNotificationBatchClass must implement the method: void System.Schedulable.execute(System.SchedulableContext)
Please help me out from this
global Database.querylocator start(Database.BatchableContext bc){
String query= 'SELECT Id, Name, email__c,birthday__c FROM account__c';
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext bc, List<account__c> acclist){
set<id> accids=new set<id>();
for(account__c acc : acclist)
{
accids.add(acc.id);
}
{
date thisdate=system.today();
integer sysday=thisdate.day();
integer sysmonth=thisdate.month();
string dayandmonth=sysday+'/'+sysmonth;
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
List<String> toAddresses = new List<String>();
toAddresses.add(iteratorUser.email__c);
email.setToAddresses(toAddresses);
List<String> ccAddresses = new List<String>();
ccAddresses.add('priyaaakanksha28@gmail.com');
email.setCcAddresses(ccAddresses);
email.setSubject('Happy Birthday. Have a blast — Birthday Reminder!');
String message = 'Happy Birthday';
email.setHtmlBody(message);
Messaging.sendEmail(new Messaging.SingleEmailMessage[]{email});
}
}
global void finish(Database.batchableContext bc)
{
}
}
This is my Code Please help me out
Class BirthdayNotificationBatchClass must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>)
Class BirthdayNotificationBatchClass must implement the method: void System.Schedulable.execute(System.SchedulableContext)
These are my errors
Please choose as best answer if the above code works for you. It will help others to find the best answers