4

I have two active duplicate rules on Account object.

  1. Is there a particular order in which they are executed? or is it random?
  2. If a record is marked as "duplicated" by a Duplicate Rule, this record will also be evaluated by the second Duplicate rules?

3 Answers 3

3

I have not found a reference in the release notes regarding which release introduced this functionality, but in the following image you can see an order number in order to set the duplucate rules execution order. It works! Duplicate rule page

1

Is there a particular order in which they are executed?

The order is undocumented, and may change from release to release or as changes to rules are made.

or is it random?

It's not "random" so much as "indeterminate." The system will run the rules in the same order for a while until conditions change, in which case the order may change. What causes the order to change is not documented.

If a record is marked as "duplicated" by a Duplicate Rule, this record will also be evaluated by the second Duplicate rules?

All rules are evaluated. It is possible for multiple DuplicateRuleSet entries to be created on a record from multiple matches. However, if any single rule matches that has a Block action, then the record is marked as "failed", and depending on allOrNone flag of the DML operatio, the remaining records will be re-evaluated, or the transaction will be completely rolled back.

1
  • Thanks @sfdcfox. I don't understand this part of your answer:" _ However, if any single rule matches that has a Block action, then the record is marked as "failed", and depending on allOrNone flag of the DML operatio, the remaining records will be re-evaluated, or the transaction will be completely rolled back_ "
    – sdfcwolf
    Commented Mar 5, 2020 at 17:34
-2

You can change the order in which duplicate rules gets executed by selecting the Object name in the view on duplicate rule screen :

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .