Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

FieldDiff

Represents the name of a matching rule field and how the values of the field compare for the duplicate and its matching record.

Fields

Field Details
difference
Type
differenceType
Description
How the values of the matching rule field compare for the duplicate and its matching record.
Possible values include:
  • Same: Indicates the field values match exactly.
  • Different: Indicates that the field values do not match.
  • Null: Indicates that the field values are a match because both values are blank.
name
Type
string
Description
The name of a field on a matching rule that detected duplicates.

Java Sample

Here is a sample that shows how to display the matching rule field differences when a duplicate is detected. 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.

1for (FieldDiff f : mr.getFieldDiffs()) {
2    System.out.println("For field " + f.getName() + " field difference is "
3        + f.getDifference().name());
4}