How to remove duplicate records in salesforce


Steps to delete Duplicate Record Set from your organization

  • Log into Data Loader.
  • Click Export.
  • Select Show all Salesforce objects and select Duplicate Record Set (DuplicateRecordSet) object.
  • Select Id and any other desired fields and follow the prompts to complete your export. For more information, review…
  • Review the resulting CSV file to verify the DuplicateRecordSet…

In Salesforce Classic

Click + (All Tabs) on the Navigation bar. Search for Duplicate Record Sets. Select the Duplicate Record Sets that need to be deleted. Click the Delete button.


How to identify duplicate records in Salesforce?

There is a two-step process to be configured within Salesforce to determine how to identify when records are duplicates and how the system will handle them. Set up the matching rules to identify the duplicate records.

Why is duplicate data management important in Salesforce?

These factors can have a direct impact on the business bottom line. It is essential to implement a duplication management strategy for your Salesforce instance, to avoid future problems. Salesforce natively has tools to help discourage or inhibit users from entering duplicate data across any device.

How to remove duplicates in report?

Remove duplicates in report. 1 Open your report in edit mode. 2 Navigate to username field and click the down icon as shown in screenshot. 3 Click ‘Group by this Field’ link which will result into grouping based on username.

How do I find duplicates in a list of records?

In the Matching Rules section, select the object to compare the records. Then select the matching rule that identifies the duplicates (set up in step 1). Select the field mapping for each matching rule, if needed.


Can we remove duplicates in Salesforce reports?

You can’t remove the duplicates in the report; the report builder doesn’t do distinct so I’d recommend Excel.

How do I stop duplicate records in Salesforce?

Block sales reps from creating duplicate leads. In the Standard Lead Duplicate Rule, select Block instead of Allow. With the Standard Lead Duplicate Rule set to block duplicates, a rep can click to view duplicates of leads but can’t save a new lead.

How can I delete duplicate records?

Remove duplicate valuesSelect the range of cells that has duplicate values you want to remove. Tip: Remove any outlines or subtotals from your data before trying to remove duplicates.Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates. … Click OK.

How do I delete duplicate records in Apex Salesforce?

Steps to delete Duplicate Record Set from your organizationLog into Data Loader.Click Export.Select Show all Salesforce objects and select Duplicate Record Set (DuplicateRecordSet) object.Select Id and any other desired fields and follow the prompts to complete your export.More items…

How can you prevent duplicate records from occurring?

Consider these strategies to help prevent duplication:Avoid rushing during the registration process, even during volume surges.Ask patients to spell their names instead of making assumptions.Meet with health information management to discuss ways to avoid duplicates.Implement consistent policies organization wide.

How do I find duplicate records in Salesforce?

Hitting the ‘Find Duplicates’ button on the Lead record, presents the option to check the following options: Name. Last Name.

How do I remove duplicates from select statement?

The go to solution for removing duplicate rows from your result sets is to include the distinct keyword in your select statement. It tells the query engine to remove duplicates to produce a result set in which every row is unique.

How do I remove duplicates in two columns?

1) Select a cell in the range => Data tab => Data Tools ribbon => click on the Remove Duplicates command button. 2) ‘Remove Duplicates’ dialog box appears. All the columns are by default selected.

How do you find duplicates in queries?

Find duplicate records with a queryOn the Create tab, in the Queries group, click Query Wizard.In the New Query dialog, click Find Duplicates Query Wizard > OK.In the list of tables, select the table you want to use and click Next.Select the fields that you want to match and click Next.More items…

How do I remove duplicates from a collection flow in Salesforce?

Solution: This problem can be solved by using operators within the Assignment Element in Flow called “Remove Uncommon” and “Remove All”. We will use assignment Element to de-duplicate the collection variable so that it can be used to Update/Delete Records.

What is duplicate record set in Salesforce?

A duplicate record set is a list of items identified as duplicates. It’s created when a duplicate rule or job runs. Let your Lightning Experience users merge duplicates by granting them access to duplicate record sets.

How do you prevent duplicate records in Salesforce using validation rule?

The most common way to prevent record creation or updates in Salesforce is through a validation rule. But can a validation rule prevent duplicates? The short answer: no. A standard validation rule can only use specific record data, so it can’t find potential duplicate records.

Prevent your users from entering duplicate records

Salesforce natively has tools to help discourage or inhibit users from entering duplicate data across any device. Duplicate management rules in Salesforce help identify potential duplicates records across accounts (business & person), contacts, leads & custom object records.

Identify if there are duplicate records within your org

Now rules have been set up to prevent duplicates from being created; you want to clean up any potential double-ups you already had in the system. We recommend using an app from the Salesforce AppExchange as a quick and easy way to understand the duplicate records within your system.

Clean up any duplicate records

The apps mentioned above all have the functionality to merge and delete duplicate records. There is also the ability to merge records natively within Salesforce.

Speak to the experts

If you find that large volumes of your records are duplicates or finding that the quality of your data is lacking, you should look to engage a data specialist. We recommend reaching out to Database Consultants Australia (DCA) to discuss the state of your data and how you can improve it further.

How to Find Duplicates in Salesforce

Salesforce has the capability to effectively manage duplicates by simply adjusting the standard duplicate settings or by creating custom rules.

How to Remove Duplicates in Salesforce Lightning Experience

Once you have your duplication-catching rules in place, go through and do a quick check of your permissions. To merge duplicate contacts in Lightning Experience, you need permissions to “delete contacts.” If you want to merge Customer Portal enabled contacts, you need permissions to delete contact records and edit Self-Service Users.

How to Remove Duplicates in Salesforce Classic

In Salesforce Classic, you can remove duplicates by merging contacts. Check your permissions before getting started. To merge contacts, ensure you have permission to delete contact records. If you plan to merge Customer Portal enabled contacts, you’ll need to be able to delete contact records and edit Self-Service Users.

Rules for Duplicate-Free Data

Matching rules and duplicate rules work together to ensure that your sales teams work with data that’s free of duplicates. Before your reps save new and updated records, matching rules and duplicate rules provide warnings of potential duplicates. You manage matching rules and duplicate rules in Setup.

Activate a Matching Rule

We provide standard matching rules for you. If you established your instance of Salesforce for Winter ’15 or earlier, like Maria, you activate the standard rules you want to use. Maria, however, wants to activate standard rules for only accounts and leads. She has other plans for her contacts, which we cover after this procedure.

Create a Custom Matching Rule for Contacts

For contacts, Maria wants to include fuzzy matching for the Mailing Street field.

Block Duplicates with Fuzzy Mailing Streets

Before an active matching rule can do anything, you pair it with a duplicate rule. You can include up to three matching rules in each duplicate rule, with one matching rule per object.

Report on the Creation of Duplicate Accounts and Leads

Maria doesn’t block reps from creating duplicates for accounts and leads. So Lincoln wants to see the quality of account and lead data and how well the duplicate rules work. To help Lincoln, Maria sets up custom report types.


Use these resources to learn more about matching rules and duplicate rules.

Hands-on Challenge

You’ll be completing this challenge in your own hands-on org. Click Launch to get started, or click the name of your org to choose a different one.

Sample Use Case

My use case was using Field Service. A Service Resource can log their Time Sheets against multiple Work Orders throughout the day, and their time needs to be associated with each specific Work Order as well as the Time Sheet for that day.

Solution Breakdown

As mentioned above – we need to create a custom object to temporarily store the records. We’ll create the records as part of the loop and delete them when we are done, but we’ll need something to pick from that isn’t the duplicate value.


What you do with the single selected record is up to you and fits your use case. Through a series of steps, I pre-populated the timesheet edit screen and also deleted the outdated TSEs so when the new TSEs are created, we don’t double count time.


Leave a Comment