You need to sign in to do that
Don't have an account?
MC2014
Change case owner in Apex causes email notification to be sent out.
I made sure that under develop -> case -> custom settings > Notify Case Owners when Case Ownership Changes is unchecked.
When I change owner through a before update trigger it ends up sending out an email to the new owner. Any thoughts?
When I change owner through a before update trigger it ends up sending out an email to the new owner. Any thoughts?
trigger CaseTrigger on Case (before update) { for(Case c : trigger.new) { c.owner = xxx; } }
Check if Notify Default Owner field is checked on Case>> Support Setting.
Also you can use DML options to restrict firing UserEmails in your apex code.
You might want to visist https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_class_Database_EmailHeader.htm for more information on DML options.
Thanks,
N.J
The field is checked, but the default user isn't the one that has been changed to.
Also, since I am not using any DML statemetns, how would I restrict it before the update.
Shouldn't the DML emailheader I've set, supercede?