| 1. |
How To Force Lead Assignment Rule Via Apex While Updating Or Adding The Lead? |
|
Answer» To ENFORCE ASSIGNMENT Rules in Apex you will need to perform FOLLOWING steps: 1. Instantiate the “Database.DMLOptions” class. // to turn ON the Assignment Rules in Apex Database.DMLOptions dmlOptn = new Database.DMLOptions(); dmlOptn.assignmentRuleHeader.useDefaultRule = true; To enforce Assignment Rules in Apex you will need to perform following steps: 1. Instantiate the “Database.DMLOptions” class. // to turn ON the Assignment Rules in Apex Database.DMLOptions dmlOptn = new Database.DMLOptions(); dmlOptn.assignmentRuleHeader.useDefaultRule = true; |
|