MatchResult
Represents the duplicate results for a matching rule.
A MatchResult object has these fields.
| Field | Type | Description |
|---|---|---|
errors | Error[] | Errors that occurred during matching for the matching rule. |
entityType | string | The entity type of the matching rule. |
matchEngine | string | The match engine for the matching rule. |
matchRecords | MatchRecord[] | Information about the duplicates detected by the matching rule. |
rule | string | The developer name of the matching rule that detected duplicates. |
size | int | The number of duplicates detected by the matching rule. |
success | boolean | true if the matching rule successfully ran. false if there’s an error with the matching rule. |
MatchResult and its constituent objects are available to organizations that use duplicate rules.
There’s one MatchResult for each saved record that has duplicates. The MatchResult contains all duplicates for that saved record.
Here’s a sample that shows how to display the ID and type of all duplicates detected when leads are saved. See DuplicateResult for a full code sample that shows how to block users from entering duplicate leads and display an alert and a list of duplicates.