Cross field Duplicate Detection Rules without code

This is a pretty old post of mine that I never published as a blog in its own right. The subject of this came from a post I saw I do like a challenge to do something without code and love it when it works!

You may have used duplicate detection rules to check values in single fields but what if we want to check the data in 3 separate fields that contain the same information but can be input in any order?

Thatโ€™s not a rare as it can sound. Letโ€™s think about email address in the contact record. There are 3 different fields we could potentially capture this in and if we were adding the contact again unless we repeated the same emails in the exact same fields, and if someone is doing a duplicate the likelihood of that is remote.

So how can we get around this without code or add ons?

The method I am going to describe below is easy to implement and you should be able to get it built in 15 minutes or there about. However before it is ready to work you will need to run 3 workflows on all existing contact records.

Stage 1 – Create a custom entity called email log
  • New field โ€“ lookup to contact
  • Add contact into the views and forms
Stage 2 – Create a workflow against contact โ€“ on creation or change of email
  • Condition to check if the email contains data
  • Create a new โ€œemail log recordโ€
  • I mapped the email to name and then the contact to contact

Note: I then created 2 more workflows, 1 for each email address. I did think about doing in one but then wouldnโ€™t know what email fields to map to where so this will be the neater option.

Each of the  3 workflows will copy the email address into the new records which is what we will check our duplicates against.

Remember to set the workflows as on demand as well and run them on all of the existing contact records so your data is prepared.

Stage 3 –  create the duplication rule

You will need to create a separate rule for each email address but they will all have the same concept.

  • Contact and email log entity
  • Email field / name field
Stage 4 – Publish then it should all work

Try creating a new contact with an email address on an existing contact, when you try and save you will see the duplicates


If you like the idea of the above but would like a little help getting there have a look at my downloadable solution.

Remember you can also follow us / keep up to date at…. Facebook / Linked In / Blogs or sign up for our newsletter D365 Byte Sized