-
Notifications
You must be signed in to change notification settings - Fork 0
The Duplicates.FieldDiff Class
GitHub Action edited this page Nov 11, 2025
·
1 revision
Represents field difference information between an original record and a matched duplicate record.
This class wraps Datacloud.FieldDiff and provides information about how a specific field differs between the records being compared.
| Property Name | Data Type | Details |
|---|---|---|
| difference | Object | The comparison value showing the difference for this field. Possible values: "DIFFERENT", "NULL", or "SAME". Read-only. |
| name | String | The name of the field that differs. Read-only. |
Returns the comparison value for this field.
Object getDifference()
Duplicates.FieldDiff diff = matchRecord.getFieldDiffs()?.get(0);
Object diffValue = diff?.getDifference();
System.debug('Difference: ' + diffValue); // "DIFFERENT", "NULL", or "SAME"Returns the field name that differs.
String getName()
String fieldName = diff?.getName();
System.debug('Field: ' + fieldName);Returns the underlying native Datacloud.FieldDiff instance.
Datacloud.FieldDiff toDatacloudType()
Datacloud.FieldDiff nativeDiff = diff?.toDatacloudType();Duplicates.MatchRecord matchRecord = matchResult.getMatchRecords()?.get(0);
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