Create Duplicate Rule
sf_create_duplicate_ruleCreate a Duplicate Rule to catch duplicate records on save using existing Matching Rules. Configure block or alert actions for standard and custom objects.
Instructions
Creates a Duplicate Rule that uses Matching Rules to detect potential duplicates when records are saved. Can block duplicates, allow with a warning, or allow silently. Works for Leads, Contacts, Accounts, and custom objects. Requires existing Matching Rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Display label | |
| isActive | No | Whether this rule is active | |
| ruleName | Yes | Duplicate rule developer name | |
| objectName | Yes | Object API name, e.g. 'Lead', 'Contact', 'Account' | |
| description | No | Description | |
| alertMessage | No | Custom message shown when duplicate is detected | |
| matchingRules | Yes | Matching rules to use for duplicate detection | |
| actionOnInsert | No | What to do when a duplicate is found on insert | AllowWithAlert |
| actionOnUpdate | No | What to do when a duplicate is found on update | Allow |