Newer Version Available
DuplicateError
Fields
| Field | Details |
|---|---|
| duplicateResult |
|
| fields |
|
| message |
|
| statusCode |
|
Usage
DuplicateError and its constituent objects are available to organizations that use duplicate rules.
DuplicateError is a data type of Error.
To process duplicates, loop through all the Error objects in the errors field on SaveResult. An Error object with a data type of DuplicateError contains information about an error that occurred when an attempt was made to save a duplicate record. To access information about the duplicates, use the duplicateResult field.
Java Sample
Here’s a sample that shows how to see if there are any errors on the saveResult with a data type of DuplicateError. If so, duplicates were 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.