Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      How Red Hat just quietly, radically transformed enterprise server Linux

      June 2, 2025

      OpenAI wants ChatGPT to be your ‘super assistant’ – what that means

      June 2, 2025

      The best Linux VPNs of 2025: Expert tested and reviewed

      June 2, 2025

      One of my favorite gaming PCs is 60% off right now

      June 2, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      `document.currentScript` is more useful than I thought.

      June 2, 2025
      Recent

      `document.currentScript` is more useful than I thought.

      June 2, 2025

      Adobe Sensei and GenAI in Practice for Enterprise CMS

      June 2, 2025

      Over The Air Updates for React Native Apps

      June 2, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025
      Recent

      You can now open ChatGPT on Windows 11 with Win+C (if you change the Settings)

      June 2, 2025

      Microsoft says Copilot can use location to change Outlook’s UI on Android

      June 2, 2025

      TempoMail — Command Line Temporary Email in Linux

      June 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Eliminating Data Duplication: A Guide to Duplicate Rules in Salesforce

    Eliminating Data Duplication: A Guide to Duplicate Rules in Salesforce

    May 17, 2024

    Hello Trailblazers!

    In the area of Salesforce data management, maintaining data accuracy and integrity is paramount. Duplicate records not only clutter databases but also lead to inefficiencies in sales, marketing, and customer service processes. To address this challenge, Salesforce offers Duplicate Rules, a powerful feature designed to identify and prevent the creation of duplicate records.

    To create the duplicate rule, we’ll require the matching rule. So, if you would like to know what is Matching Rule and how to create it, then you can go with this link.

    In this blog, we’ll explore the significance of Duplicate Rules, their implementation, and best practices for maximizing their effectiveness.

    So let’s get started!

    What is a Duplicate Rule?

    Duplicate Rules in Salesforce are a set of criteria that define when a new record is considered a duplicate of an existing record. These rules help organizations enforce data quality standards by identifying potential duplicates in real time during data entry or import processes. By preventing the creation of duplicate records, Duplicate Rules ensure a clean and reliable database.

     

    How to Create Duplicate Rules?

    Here we’ll create a duplicate rule on the Employee object to ensure that duplicate employee records should not created.

    To create the duplicate rule, follow the below steps:

    Go to the Setup.
    Enter Duplicate Rules in the Quick Find box.
    Click Duplicate Rules under Duplicate Management.
    It’ll take you to the Duplicate Rules page where Standard Duplicate rules for Account, Contact, and Lead Objects are already created as shown in the figure below.
    Click on the “New Rule” as shown above.
    Select the “Employee” object.
    Define the Rule name.
    In the Record Level Security, select the “Enforce Sharing Rules”.
    The difference between the Enforce Sharing and Bypass Sharing rules is, that when you enforce sharing rules, the matching rule only considers records that the user has access to, whereas when bypassing sharing rules, all records are evaluated without any access restrictions.
    In the actions, Set the actions that should be taken when a user creates or edits a duplicate record. When you choose alert, provide a suitable alert message explaining why the user is unable to save the information and what the next step is.
    See the figure below.

    In the Matching rules section, the object will be there – already selected.
    Then, click on the dropdown and select the desired matching rule. Here I’m selecting the matching rule that we created in the previous blog. If you do not know how to create a matching rule, then you can go with this link.
    By clicking on “Add Rule” button, you can also add multiple matching rules.
    If the rule requires any conditions to be met, then you can define those criteria. This is optional.
    Click Save.
    Click Activate.

    With this simple steps, you can create a duplicate rule for any object.

    Now it’s time to test the Duplicate rule and Matching rule that we’ve created so far.

     

    Testing the Duplicate Rule:

    To test the rule, create a record that matches the field of the existing record. Here, we create a new employee record whose “Email” field matches the existing employee record.
    So, it will give an “Alert Message” that this record is a potential duplicate.
    Click “View Duplicate” to see the duplicate records as shown above.
    You can see it has one duplicate record.

    But, if you ignore this, you can still save the record even if it is a duplicate.

    How to Prevent Users from Saving Duplicate Records?

    To prevent users from saving duplicate records, you need to block the permission/action. So, to achieve this, follow the instructions below.

    Open the Duplicate rule that you created.
    Click Edit.
    Under the Actions, select “Block” when Create and Edit Action. This will restrict the user from saving the record if the duplicate is found.
    Click Save.

    Your rule will look like this.

    Conclusion:

    Duplicate Rules in Salesforce are a vital tool for maintaining data quality and preventing the proliferation of duplicate records. In this way, you can create a duplicate rule and specify the actions like Allow or Block to allow and block the user from saving the duplicate records.

    Happy Reading!!

     

    References:

    Duplicate Rules Salesforce
    How to Customize Duplicate Rules?

    You Can Also Read:

    An Introduction to Salesforce CPQ
    Salesforce CPQ and its Key Features
    Unlocking the Power of AI: Einstein for Developers
    Revolutionizing Customer Engagement: The Salesforce Einstein Chatbot

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHow to convert a CSV file to an Excel file
    Next Article Understanding Matching Rules in Salesforce

    Related Posts

    Development

    A Beginner’s Guide to Graphs — From Google Maps to Chessboards

    June 2, 2025
    Development

    How to Code Linked Lists with TypeScript: A Handbook for Developers

    June 2, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Google Releases Gemma 2 Series Models: Advanced LLM Models in 9B and 27B Sizes Trained on 13T Tokens

    Development

    CVE-2024-11186 – Arista CloudVision Portal Elevated Privilege Access Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Rilasciato SparkyLinux 7.6: Scopri le Novità

    Development

    The 30+ best Black Friday Apple deals 2024: Early sales available now

    Development

    Highlights

    News & Updates

    AI fatigue? Well, HP just updated its AI Companion app — here’s what it can do.

    March 18, 2025

    HP’s Amplify 2025 conference is underway, and a number of new and updated AI tools…

    Your Google Pixel just got a big Android 15 update – including a critical security fix

    May 8, 2025

    The AdEMAMix Optimizer: Better, Faster, Older

    April 11, 2025

    These 6 lightweight Linux apps let older PCs run blazing fast

    April 21, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.