DuplicateError Class
Contains information about an error that occurred when an attempt was made to save a duplicate record. Use if your organization has set up duplicate rules, which are part of the Duplicate Management feature.
When you try to save a record that’s identified as a duplicate record by a duplicate rule, you’ll receive a duplicate error. If the duplicate rule contains the Allow action, an attempt will be made to bypass the error.
See Also
The following are methods for DuplicateError.
-
Returns the details of a duplicate rule and duplicate records found by the duplicate rule.
-
Returns an array of one or more field names. Identifies which fields in the object, if any, affected the error condition.
-
Returns the error message text.
-
Returns a code that characterizes the error.
Returns the details of a duplicate rule and duplicate records found by the duplicate rule.
public Datacloud.DuplicateResult getDuplicateResult()
Type: Datacloud.DuplicateResult
This example shows the code used to get the possible duplicates and related match information after saving a new contact. This code is part of a custom application that implements duplicate management when users add a contact. See DuplicateResult Class to check out the entire sample applicaton.
Returns an array of one or more field names. Identifies which fields in the object, if any, affected the error condition.
public List<String> getFields()
Type: List<String>
Returns the error message text.
public String getMessage()
Type: String
Returns a code that characterizes the error.
public StatusCode getStatusCode()
Type: StatusCode