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
AniltAnilt 

Active Assignment Rule, Auto-Response Rule

I'm writing a trigger (with DML Operations provided in http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_dmloptions.htm) to check the 'Assign using active assignment rules' and 'Send notification email to contact' based on some conditions to work on Active Assignment Rule and Auto-Response Rule

 

Here is the Trigger based on the link provided above:

 

trigger AssignmentRule on Case (After Update, After Insert) {
for (Case c : System.Trigger.New) {
Database.DMLOptions dmo = new Database.DMLOptions();
If(c.Status=='New')
{
dmo.assignmentRuleHeader.useDefaultRule= true;
}
}
}

 

Please someone help me regarding this.

sfdcfoxsfdcfox

You use those options in a VF page or to affect other records. AFAIK, you can't use DML options on records already being processed.