Cert++
Close

Duplicate-rule block actions versus later automation

Key Takeaway

A duplicate rule that finds a duplicate and uses the "Block" action stops the save. As a result, after-save record-triggered flows, assignment rules and everything else later in the order never run for that record. With the "Allow" action, the save and that later automation go ahead.

Salesforce follows a fixed order when it saves a record. Duplicate rules are one step in that order. They run after before-save record-triggered flows, before triggers and validation rules, but before the record is saved to the database. Because of where they sit, a duplicate rule that finds a duplicate and blocks the save also stops all the automation that would come later.

Matching rules and duplicate rules

Matching rules and duplicate rules work as a pair. A matching rule identifies possible duplicates. A duplicate rule decides what to do with them. For example, it can block the save (the Block action), allow the save with an alert (the Allow action), or report the duplicate (the "Report" option).

A duplicate rule can act when a record is created or when it is edited. Blocking the creation of duplicates and blocking edits that result in duplicates are separate choices in the rule.

On edits, a duplicate rule runs only when the edited fields are included in its matching rule. If the rule doesn't run, it can't block the edit.

A matching rule on accounts compares Account Name and Billing City. Mei opens an account, changes only the Rating field and saves. Rating isn't in the matching rule, so the duplicate rule doesn't run. The rule can't block Mei's edit.

Field access also affects whether duplicates are found. If the user saving the record can't access one or more fields referenced in the matching rule, the duplicate rule doesn't identify duplicates. So the same save can be blocked for an admin but go through for a standard user who lacks access to those fields.

Platform Administrator II Study Guide

Checklist progress

0/290Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform Administrator II studiers.