Showing posts with label Schedulable. Show all posts
Showing posts with label Schedulable. Show all posts

Wednesday 11 September 2013

Email Case Team Members on Case Comment

14:40

This is going to be a short blog for a requirement I came across, But didn't find any blogs out there addressing this. So lets get right to it, I need to notify all the case team members when a case comment is logged, be it contact, users etc.


Here's what we'll need


  • Trigger on Case Comment 
  • A Helper Class (To keep the trigger clean)
  • Test Class ( Don't forget to test your code)
To make things look clean we'll keep most of the code to the helper class,

Thursday 10 January 2013

How to write Batch Class in Salesforce.com Apex

10:00

batchApexIn order for us to write batch classes in apex, let us 1st understand what is batch class , when and where it should be used? This is an extensive blog going into details.
Main sections of this post are
  1. What is batch Apex
  2. When to use batch apex
  3. Advantages of using batch apex
  4. Batch Apex Governor limits
  5. Sample Code

Sunday 6 January 2013

Run Batch Class Hourly

16:34
This is a use case that we all come across very often, Schedule a batch class every hour to clean up data or to send out batch emails to case team members (Which I’ll blog about later).
There are three main steps involved in this
  1. Write a Batch class with the required logic
  2. Write a Scheduled Apex which calls the above Batch Class
  3. Schedule the class from the developer console by executing anonymous apex