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
MilanMilan 

Is ' useDefaultRule = true' same as' NOT passing the AssignmentRuleHeader ' ?

Hello,
 
I need to create Leads using API. During creation, it may have AssignmentRules, based on certain business logic. My simple question :
 
For those leads which do NOT have an assignmentRule, do I :
  1. Set the useDefaultRule to true ? OR
  2. Do not pass the AssignmentRuleHeader itself in the SOAPHeader .

Which one is the correct way to do ? Or is 1 and 2 the same ?

Thanks,

Milan

SuperfellSuperfell
in general 1 and 2 are NOT the same, if you don't pass up the assignmentRuleHeader, then no assignment rules will be run at all. But you seem to be saying that you have leads that wouldn't trigger assignment rules, in which case the create will go faster if you don't run the rules, and the outcome would be the same.