Newer Version Available
MatchResult
Fields
| Field | Details |
|---|---|
| errors |
|
| entityType |
|
| matchEngine |
|
| matchRecords |
|
| rule |
|
| size |
|
| success |
|
Usage
MatchResult and its constituent objects are available to organizations that use duplicate rules.
There is 1 MatchResult for each saved record that has duplicates. The MatchResult contains all duplicates for that saved record.
Java Sample
Here is 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.
1swfobject.registerObject("clippy.codeblock-0", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17for (MatchResult m : dupeResult.getMatchResults()) {
18 if (m.isSuccess()) {
19 System.out.println("The match rule that was triggered was " + m.getRule());
20 for (MatchRecord mr : m.getMatchRecords()) {
21 System.out.println("Your record matched " + mr.getRecord().getId() + " of type "
22 + mr.getRecord().getType());
23 System.out.println("The match confidence is " + mr.getMatchConfidence());
24 }
25 }
26}