O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sample Application: Adding Email Notifications

This section applies your knowledge of Apex’s outbound email features to enhance the Services Manager sample application. Many scenarios in Services Manager could benefit from email notifications. For example, consultants have requested that they get an email when a timecard is approved or rejected by their project managers.

To implement this change, add a trigger on the after update event of the Timecard object. If the new value of the Timecard’s Status field is Approved or Rejected, query the Contact record that created the Timecard. Send an email notification of the change to the Contact.

Listing 5.41 is a sample implementation. It begins by checking to make sure that the updated Timecard contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required