-
Notifications
You must be signed in to change notification settings - Fork 0
The Duplicates.MatchRecord Class
GitHub Action edited this page Nov 11, 2025
·
1 revision
Represents a specific matched record in a duplicate detection result.
This class wraps Datacloud.MatchRecord and contains the matching record, confidence score, field differences, and additional information about the match.
| Property Name | Data Type | Details |
|---|---|---|
| additionalInformation | List<Duplicates.AdditionalInformationMap> | Additional information about the match as name-value pairs. Read-only. |
| fieldDiffs | List<Duplicates.FieldDiff> | List of field differences between the original and matching record. Read-only. |
| matchConfidence | Decimal | The confidence score for this match. Read-only. |
| record | SObject | The matching SObject record. Read-only. |
Returns additional information about the match.
List<Duplicates.AdditionalInformationMap> getAdditionalInformation()
Duplicates.MatchRecord matchRecord = matchResult.getMatchRecords()?.get(0);
for (Duplicates.AdditionalInformationMap info : matchRecord.getAdditionalInformation()) {
System.debug(info.getName() + ': ' + info.getValue());
}Returns the field differences between original and matching record.
List<Duplicates.FieldDiff> getFieldDiffs()
for (Duplicates.FieldDiff diff : matchRecord.getFieldDiffs()) {
System.debug(diff.getName() + ' is ' + diff.getDifference());
}Returns the match confidence score.
Decimal getMatchConfidence()
Decimal confidence = matchRecord?.getMatchConfidence();
System.debug('Confidence: ' + confidence + '%');Returns the matching record.
SObject getRecord()
SObject duplicateRecord = matchRecord?.getRecord();
System.debug('Duplicate: ' + duplicateRecord);Returns the underlying native Datacloud.MatchRecord instance.
Datacloud.MatchRecord toDatacloudType()
Datacloud.MatchRecord nativeRecord = matchRecord?.toDatacloudType();Duplicates.MatchResult matchResult = dupResult.getMatchResults()?.get(0);
for (Duplicates.MatchRecord matchRecord : matchResult.getMatchRecords()) {
System.debug('Match: ' + matchRecord.getRecord());
System.debug('Confidence: ' + matchRecord.getMatchConfidence());
for (Duplicates.FieldDiff diff : matchRecord.getFieldDiffs()) {
System.debug(' ' + diff.getName() + ': ' + diff.getDifference());
}
}- Generating Test Records
- Dml
- Soql
- Cmdt
- Duplicates
- Plugins
- DatabaseLayer
- Dml
- MockDml
- MockRecord
- Cmdt
- MockCmdt
- Duplicates
- MockDuplicates
- MockSoql
-
Soql
- Soql.AggregateResult
- Soql.Aggregation
- Soql.Binder
- Soql.Builder
- Soql.Condition
- Soql.ConditionalLogic
- Soql.Criteria
- Soql.Cursor
- Soql.Function
- Soql.InnerQuery
- Soql.InvalidParameterValueException
- Soql.LogicType
- Soql.NullOrder
- Soql.Operation
- Soql.Operator
- Soql.ParentField
- Soql.PreAndPostProcessor
- Soql.QueryLocator
- Soql.Request
- Soql.Scope
- Soql.Selectable
- Soql.SortDirection
- Soql.SortOrder
- Soql.Subquery
- Soql.TypeOf
- Soql.Usage
- Soql.WhenClause