I need to send a reminder email to the opportunity owners if the modified date is greater than 12 months. I have created a workflow with the below condition. I need to send only one reminder on 13th month 1st Day(since I have mentioned the condition as ‘modified on’ on or before 12-current date, a daily email will be triggered to the opportunity owner). Once the email is sent, I have tried to update a field(is email sent ='yes') in the opportunity entity, but since it is system update, 'modified on' date field is getting changed. I do not want 'modified on' date field is getting changed. Is there any way to restrict only one email is being sent to the opportunity owner?
Hi,
You can use custom workflow to add check condition before sending an email from workflow. Add new custom field in Email itself say Opportunity Reminder Sent.
Input variable - Opportunity record
Output variable - email found bool data type
Custom workflow c# code will first check if there is any existing Email already present (use custom field in filter condition)in system for the current opportunity record. If record returned from this check is zero then set the output parameter to no else set yes.
then in workflow check this output parameter and send email if email found(Output parameter from custom workflow) is no.
If it were me, I would create a field on the Opportunity Entity named "OpportunityReminderSent ".
Then I would edit the filter on the workflow to include AND OpportunityReminderSent Does Not Contain Data
Then when the workflow runs, it uses the original criteria and the new "OpportunityReminderSent " field to determine Opportunities that do not yet have the "OpportunityReminderSent" populated.
Your workflow will then send the initial 13 month email reminder and the final step is to update the Opportunity to set the "OpportunityReminderSent" to the date the workflow sent the email.
Yes the modified on date will now change, but that no longer matters since you are ALSO looking for a blank/null "OpportunityReminderSent" and that won't be blank/null since you are sending the 13 month email for it.
The fact the modified on date gets updated when a value is written to "OpportunityReminderSent" is no longer a problem.
That will ensure the Opportunity is only actioned on with a 13 month reminder email one time.
Yes, I can do that. Now the problem is, I cannot update a field in the opportunity entity after email is sent. This is updating my 'modified on'
date field(which I dont want). So I need alternate solution to send a single email to opportunity owners.
Why don't you add "email sent" = no to the condition filter?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156