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?
2

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

0

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 Mar 5 '20 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.