function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MikeGoelzerMikeGoelzer 

Is there an "AssignmentRuleHeader" equivalent in Apex?

Is there any way in Apex to do an update on Case without re-running the assignment rules?  The SOAP API has a header for exactly this purpose, but is there any equivalent in Apex?

MikeGoelzerMikeGoelzer
A little update:  it turns out that this is actually the result of a bug/feature in the backend handling of Email to Case agent's handleEmail call.  E2C does an insert on task, and if you have a task insert trigger that in turn updates a case, then it will re-evaluate the assignment rules.  Same trigger invoked any other way does not re-run them!

Might log a support case about this, but does anyone know if we can just control it directly?  I keep looking for a System.setCurrentAssignmentRulesMode() method... :-)
TehNrdTehNrd
http://ideas.salesforce.com/article/show/10094219/Invoke_Assignment_Rules_with_Apex#skin=le