You need to sign in to do that
Don't have an account?

How can i send an email when an opportunity closed date has passed todays date ??
Hey Guys,
Can any body help me how can i send an email alert to a user(opportunity owner), of all my existing opportunities if the closed date has passed todays date. i tried to write a work flow but it does not work for the exsisting records. how can i over come this and send an emai notification to the user if todays date is passed.
Thanks in advance,
Virinchi.
Can any body help me how can i send an email alert to a user(opportunity owner), of all my existing opportunities if the closed date has passed todays date. i tried to write a work flow but it does not work for the exsisting records. how can i over come this and send an emai notification to the user if todays date is passed.
Thanks in advance,
Virinchi.
There are 2 ways we can achieve this:
(1) Workflow: You can configure Workflow with Time Dependent Email Alert action.
But here you need to retrieve and update all existing records to fire the worklfow for existing records.
(2) Batch Apex:
We have to write a Batch Apex and send an email.
Here is the code for Batch Apex:
Please do let me know if it helps you.
Regards,
Mahesh
All Answers
There are 2 ways we can achieve this:
(1) Workflow: You can configure Workflow with Time Dependent Email Alert action.
But here you need to retrieve and update all existing records to fire the worklfow for existing records.
(2) Batch Apex:
We have to write a Batch Apex and send an email.
Here is the code for Batch Apex:
Please do let me know if it helps you.
Regards,
Mahesh
Thanks for the replay. Here is my scenario if the opportunity has passed the closed date and if the opportunity is still open then the work flow action should be fired. By using the 1st way configuring the Work flow using time based work flow action if i give the rule like this
>> Opportunity:Close date is greater than Today
>> Opportuity:Open/Close equals Open
Time based Action: 0 hours after the Closed date
Send the email to the User.
What if the opportunity is closed in between these days. does the time based trigger send the email or not. ??
And also could you help me writing that workflow with the time based action in my scenario.
Thanks,
Virinchi.
If the Opportunity chnaged to closed then the time dependent action will automatically deleted.
Also find the screenshot.
Please do let me know if it helps you.
Regards,
Mahesh
You can extract / export using the Apex Data Loader and update them back to Salesforce.
Regards,
Mahesh