"Stop Automated Field Updates from Suppressing Email Notifications" sending duplicate assignment email for Opportunity record
Last updated 2022-07-07 ·Reference W-4287656 ·Reported By 79 users
In Review
Summary
**In addition to the behavior mentioned in this known issue the issue can manifest itself in other scenarios. Please refer to the following known issue: https://success.salesforce.com/issues_view?title=missing-or-duplicate-emails-when-stop-automated-field-updates-from-suppressing-email-notifications-is-enabled&Id=a1p3A000000EX9r**
"Stop Automated Field Updates from Suppressing Email Notifications" sending duplicate assignment email for Opportunity if the record is updated in After Update Trigger.
In this scenario, there is an After Update Trigger on Opportunity Objects which updates the Amount Field. The Critical Update "Stop Automated Field Updates from Suppressing Email Notifications" [ https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/rn_forcecom_process_emails.htm ] has been Activated in the Org.
When we change the Owner of the Opportunity record via UI, and enable the checkbox "Send Notification Email", the Trigger executes as per normal. However, the User receives two emails for the assignation.
Since we have changed the owner of the Opportunity only once, there should be only one email which should be sent.
When Critical Update is deactivated, or when the Trigger is Inactive, only one email is sent.
Repro
In a fresh org :
- Login as the System Admin.
- Activate the Critical Update “Stop Automated Field Updates from Suppressing Email Notifications”
- Create an after update trigger on Opportunity object as follows -
Apex class:
public class reccontrol{
public static boolean myflag=false;
}
Apex trigger:
Trigger OpportunityTrigger on Opportunity (after update) {
static boolean isOppLeadUpdate = false;
if(reccontrol.myflag) {
return;
}
reccontrol.myflag= true;
Opportunity newOpp = Trigger.new[0];
Opportunity updatedOpp = new Opportunity();
updatedOpp.Id = newOpp.Id;
if(updatedOpp.Amount == null) {
updatedOpp.Amount = 0;
}
updatedOpp.Amount = newOpp.Amount + 1 ;
if(updatedOpp!=null) {
update updatedOpp;
}
}
- Create another user with “Standard User” profile with the same email as yours - let's call it “test_user”
- Create an Opportunity object with the value of Amount as, say 100.
- Now change the owner of the opportunity to “test_user” with “Send Notification Email” enabled.
- The opportunity amount is incremented by one and the owner is changed to “test_user”.
- The notification email is sent twice.
Workaround
Use a Before Insert trigger or Disable the Critical Update.
Reported By (79)














Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.