Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Can you exclude a value from Duplicate Detection?

Posted on by

Hello!

We are trying to beef up our duplicate detection on the Contact Entity. Currently, "Email Address" is a required field, so if you don't know the email, our users have been trained to enter "Unknown@unknown.com" so that we can easily filter out those addresses. The issue arises in that we want to start using duplicate detection for common email addresses across contacts, but we are getting lots of duplicates that have the Unknown@unknown.com email. We want to be able to exclude that value from throwing a duplicate warning. Does anyone know of a way to do this?

Thanks!

Categories:
  • Suggested answer
    CVO Profile Picture
    CVO 77 on at
    RE: Can you exclude a value from Duplicate Detection?

    I know this thread is old, but I find myself here after looking for a solution to ignore a default value that is applied to a field which we have a duplicate detection rule for.

    There is an OOTB solution, and that is...

    • Create a blank dummy field, not visible on the form (eg: Email (for Duplicate Detection)
    • Create a Business Rule that will copy the value of the Email field to the hidden field if the value of the field that you can see is not "unknown@unknown.com", otherwise, clear the hidden field.
    • You can now use the hidden field in your duplicate detection rule and ingore blank values.

    I think really putting a value of "Unknown@unknown.com" in a field rather than leaving it blank is a bad idea.  The best solution in this case I think is to "untrain" the users and leave the email blank if they don't know it.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Can you exclude a value from Duplicate Detection?

    Hi,

    Unfortunately, you can't exclude specific record from the duplicate detection. You can only exclude inactive records and blank values for the field.

    The workaround I can think of is to manipulate the email address with the unique value before saving using javascript i.e. check if the value is "unknown@unknown.com", if yes then generate a uniue value and save it. This way your users will still be entering unknown@unknown.com but system will always have unique value thus duplicate detection will not fail.

    You could use this JS method: stackoverflow.com/.../create-guid-uuid-in-javascript

    Hope this helps.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Can you exclude a value from Duplicate Detection?

    Hi,

    in this case go for workflow or plugin. throw some meaningful error message to user or skip the plugin based on your logic.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Can you exclude a value from Duplicate Detection?

    Hi ,

    I would suggest to write a plugin in pre-operation and validate based on your requirement , if its duplicate then throw an error except the duplicate which you want  and unpublish the existing duplicate detection rule

  • aforsythe Profile Picture
    aforsythe on at
    RE: Can you exclude a value from Duplicate Detection?

    Phone numbers are required too, with "unknown" value being "111-111-1111". We would have the same issue.

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Can you exclude a value from Duplicate Detection?

    You can un-publish current duplicate detection that is running on email and create a new duplicate detection on a unique value like phone number etc.

  • aforsythe Profile Picture
    aforsythe on at
    RE: Can you exclude a value from Duplicate Detection?

    Thanks for the reply! Unfortunately, knowing our users, if we make that field non-mandatory, it will never get filled out for the majority of new contacts. At least this way, it forces them to at least consider whether or not they can get that email. I was almost thinking I could maybe make it an "AND" so if the email address is the same and the last name is the same or something like that. But that could potentially exclude "true" duplicates that we would actually want to catch as well. What a pain. Seems like it should be a no brainer to say "if email address does not contain 'unknown'"

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Can you exclude a value from Duplicate Detection?

    No, We can only ignore "inactive records and blank values".

    You can do one thing make email field non mandatory and remove "Unknown@unknown.com" from all records with help of bulk edit.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans