0

Currently we have a setup wherein when the owner of a case is updated via a Visualforce page.

The problem is the Standard Case Notiifcation when the owner is changed is not being sent out when the owner is changed thru the visualforce page.

We already have defaulted the "Notify Case Owners when Case Ownership Changes" setup in Setup>Case>Support Settings but no notification is still being sent when the owner is updated via the custom page.

But if we change the owner using the standard [Change] link within the Case Detailed page. the Case Notification is being sent to the new owner.

Is there a reason why when the Case Owner is updated via a Visualforcepage it doesn't fire the Case Notification email when the owner is changed?

NOTE: We are not using Assignment Rules just the Standard Case Notification alert when the Owner is changed

Thanks!!

0

You want to look into using DMLoptions in your Apex.

See the docs below but the general usage is as follows

Database.DMLOptions options = new Database.DMLOptions();
options.EmailHeader.triggerUserEmail = true;
database.update(your_object, options); 

https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_dml_database_dmloptions.htm#EmailHeaderProperty-B5377B04

2
  • BRILLIANT!!! You're the real MVP! – sfdx Feb 24 '15 at 21:46
  • lol.....glad it worked for you. – Chris Duncombe Feb 24 '15 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.