No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
DmlOptions.AssignmentRuleHeader Class
Enables setting assignment rule options.
Namespace
Example
The following example uses the useDefaultRule option:
1Database.DMLOptions dmo = new Database.DMLOptions();
2dmo.assignmentRuleHeader.useDefaultRule= true;
3
4Lead l = new Lead(company='ABC', lastname='Smith');
5l.setOptions(dmo);
6insert l;The following example uses the assignmentRuleID option:
1Database.DMLOptions dmo = new Database.DMLOptions();
2dmo.assignmentRuleHeader.assignmentRuleId= '01QD0000000EqAn';
3
4Lead l = new Lead(company='ABC', lastname='Smith');
5l.setOptions(dmo);
6insert l;DmlOptions.AssignmentRuleHeader Properties
The following are properties for DmlOptions.AssignmentRuleHeader.
assignmentRuleID
Specifies the ID of a specific assignment rule to run for
the case or lead. The assignment rule can be active or inactive.
Signature
public Id assignmentRuleID {get; set;}
Property Value
Type: ID
Usage
The ID can be retrieved by querying the AssignmentRule sObject. If specified, do not specify useDefaultRule.
If the value is not in the correct ID format (15-character or 18-character Salesforce ID), the call fails and an exception is returned.
useDefaultRule
If specified as true for a case or lead, the system uses the default (active) assignment
rule for the case or lead. If specified, do not specify an assignmentRuleId.
Signature
public Boolean useDefaultRule {get; set;}
Property Value
Type: Boolean