How to enable Duplicate prevention upon manual entry in Salesforce Lightning

Last published at: November 18th, 2024
Delete

If you are using the Classic version of Salesforce please read this article.

When using Duplicate Prevention in the standard Lightning Entry page, Duplicate Check is limited to showing only a text message. If you want to show the actual duplicate records in Lightning, we need to replace the native entry page with the DC Entry Lightning Component. This article will show you how.
Duplicate prevention upon manual entry

Delete

DC Entry and RV Entry

Note that you can only configure one Entry page. To use both Duplicate Check and Record Validation when creating or editing a record, do not apply DC Entry, but instead use the RV Entry page in combination with DC Scenario settings. Read more in Integrate Duplicate Check with Record Validation‍.

1. Replace the native entry page with DC Entry page

From DC version 3.362 onward:

  1. Go to Salesforce Setup > Object Manager.
  2. Open the Object where you want to use the DC Entry page. 
  3. At left, go to Buttons, Links, and Actions.
  4. At the 'New' line, click Edit.
  5. At 'Lightning Experience Override', click Lightning Component, and select the dupcheck:dc3EntryRecordForm Lightning Component.
  6. Click Save.
  7. Repeat steps 5. and 6. for the Edit button: still in 'Buttons, Links and Actions', at the 'Edit' line, click Edit
  8. At 'Lightning Experience Override', click Lightning Component, and select the dupcheck:dc3EntryRecordForm Lightning Component.
  9. Click Save.
Delete

In older versions of DC, the lightning component to use used to be dupcheck:dc3RecordForm. This component is currently still available and will still work for now, but will be deprecated in the future.

Step 2 Enable Duplicate prevention upon manual entry in Salesforce Lightning

  1. Navigate to DC Setup in the Duplicate Check application.
  2. Navigate to the particular object you want to enable prevention upon manual entry for.
  3. Navigate to the Scenario tab and make sure that you have applied the scenario to 'Manual Insert Prevention'. If you want Duplicate Check to trigger upon editing a record as well, apply the scenario to 'Manual Update Prevention'.

Step 3 Option to hard-block the user for creating duplicate records

  1. Go to DC Setup - Settings.
  2. At 'Duplicate Prevention in Native Entry Page Lightning', make sure the toggle switch is set to 'Enabled' if you do want to hard-block the user for creating the record when duplicates are found.
  3. The user can bypass this hard-block if they have field access (at least Read access) to the 'Disable Duplicate Check' field.
  4. At 'Duplicate Prevention in Native Entry Page Lightning', make sure the toggle switch is set to 'Disabled' if you do not want to hard-block the user for creating the record when duplicates are found.
Delete

For non-standard and custom objects, you need to create the 'Disable Duplicate Check' checkbox first, and the hard-block will only work when the Apex Trigger is created. Find out how in steps 6 and 7 of this article.

Delete

Duplicate Check now returns potential duplicate records while you are filling out the form. Duplicate Check decides what a duplicate record is, and how to compare your new entry, based on the applied scenario(s). Learn more about scenarios here.

Delete

Not supported for Tasks

For now, DC Entry is not available for the Task object.