9

Goal:

When a case matches criteria is created assign the Case Owner to "Research Queue" and e-mail queue members.

Current setup:

  1. Queue created for Cases, no distribution email listed (Just Members)
  2. Create Assignment rule to assign Cases to queue based on criteria. Included E-mail Template for Notification

Result:

  1. Case assignment is successful. Case Owners are changed to the desired queue
  2. No e-mail notification is sent to the members

I'm stumped why the e-mails won't go out. It should e-mail each user individually, yet it doesn't.

Update:

The case is inserted via Apex. The Assignment Rule is being queried and set in the DML Options before the insert occurs. The Rule is being fired, the Assignment Rule assigns the owner, but does not do the E-mail notification.

If I manually create the case - bypassing the Apex setup -- the Assignment rule also fires AND sends the notification.

AssignmentRule AR = new AssignmentRule(); 
//Assignment Rule Query
AR = [select id from AssignmentRule where SobjectType = 'Case' and Active = true limit 1];
//Creating DML Options
Database.DMLOptions dmlOpts = new Database.DMLOptions();
if(AR != null){
   dmlOpts.assignmentRuleHeader.assignmentRuleID = AR.ID;
   mycase.setOptions(dmlOpts);
   insert mycase;  
}

So the Code assigns the Assignment rule (Which returns a valid rule), adds it to my DMlOptions and then sets the options. What else has to happen here?

2
  • did you test the Email Deliverablity :: setup > administration >Email Administration > Test Email Deliverablity -- Worth a check to make sure nothing is blocked first
    – Saariko
    Commented Oct 15, 2012 at 20:32
  • Yep emails aren't being blocked. They're not even being sent Commented Oct 15, 2012 at 21:08

2 Answers 2

12

So the issues turns out to be the DML options.

In order for e-mails to get sent - even from Assignment Rules, the DML option has to be updated:

dmlOpts.EmailHeader.TriggerUserEmail = true;

Otherwise it will ignore any email trying to be sent internally that is not called by apex directly.

2
0

Check the properties of the case page layout.

Email notification checkbox [x] Select by default

2
  • Are you referring to the notification when a case is being created or when the owner is being changed? The notification is being sent from an Assignment Rule (Which is firing) not just the generic Email notification from the page layout. Commented Oct 15, 2012 at 19:43
  • Could you flesh out this answer a bit? The OP took the time to fully describe their problem, but for many users it could be hard to see how this answer connects.
    – Benj
    Commented Nov 9, 2012 at 1:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .