Newer Version Available

This content describes an older version of this product. View Latest

Check for Duplicate Records

Before updating or creating a record, you can check whether a duplicate record exists. Use the response to learn whether to block or allow the action, and whether to warn the user.

To learn more about when to check for duplicate records, see Get Duplicate Management Configuration for a Specified Object.

Tip

Resource
1/ui-api/predupe
Available Version
50.0
HTTP Method
POST
Example
Use the following request to check whether a duplicate record for the movie "Aliens" exists.
1ui-api/predupe{
2"apiName" : "Movie__c",
3"fields" :
4{"Name": "Aliens",
5  "Year__c": "1986"
6}
Request Body
Name Type Description Required or Optional Available Version
apiName String Specify the API name of the object for which you’re performing the duplicate check. Required 41.0
fields Map<String, Object> Map of field names and values that the duplicate rule uses to check for duplicates.

Format data types according to these rules:

  • Address—JSON String. Addresses are compound fields and must be broken up into their constituent fields. See the previous example.
  • Boolean—JSON Boolean, true or false
  • Currency—JSON Number (for example, 67.54)
  • Date—JSON string (for example, 2020-04-20)
  • DateTime—JSON string in ISO 8601 format (for example, 2012-02-18T06:40:41.000Z)
  • Double—JSON Number
  • Email—JSON String (for example, joe@smith.com)
  • EncryptedString—JSON String
  • Int—JSON Number
  • Location—JSON String. Location fields are compound fields and must be broken up into their constituent fields.
  • MultiPicklist—JSON String (for example, Dog;Cat;Fish).
  • Percent—JSON Number
  • Phone—JSON String
  • Picklist—JSON String
  • Reference—JSON String
  • String—JSON String
  • TextArea—JSON String
  • Time—JSON String in format HH:MM:SS
  • Url—JSON String

To specify the main record type, either don’t specify the recordTypeId field, or set it to null.

Required 41.0
Response Body
Duplicates