You need to sign in to do that
Don't have an account?
Naveen Dhanaraj
I just wanted to send the birthday wishes automatically who are in the patient list and in Doctors list
I have a two ojects called Patients and Doctors .In that i have field called DOB(date type ).it should send email of birthday wishes to all the records in patients and doctors AUTOMATICALLY on their Birthday
You have to write batch class .
In workflow we can't do this becase we have to fire the email for the saved record .Even Timebased workflow will fire only once , user will not get email for his/her next birthday.
Thanks.
can you help me regarding how to write a batch class for this
You can achieve this functionality by using Batch Apex and Schedule Apex.
Please check the below sample code.
Batch Apex:
Schedule Apex:
Scheduling an Apex Job through the ui
Go to Setup -> Develop -> Classes--->You will see a "Schedule Apex" button. You can set up the timing from there.
Hope this helps you!
Best Regards,
Jyothsna
As Jyothsna specified you can follow, I am extending batch class functionality to support multiple objects, pelase find the following solution -
Batch Class:
Schedulable Class:
Schedule:
Navigation: Setup > Develop > Apex Classes > Click on 'Schedule Apex'
------------
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
how to see apex class.how to enable n select apex calsees when i create a shedule apex.plz reply