Tip #1028: Prevent duplicate contacts the Viking way

Marius “CRM Viking” Pedersen gave us a great tip about how to prevent duplicate contacts from being created in Dynamics 365:

I set emailaddress as alternate key on contact once. That actually worked very well to prevent duplicate contacts from being created. It also required that all contacts must have an email address.

You have to start with clean data, either at the beginning of a deployment, or deduplicate your contacts, as you cannot create an alternate key on a field that contains duplicate data.

An additional benefit is that when you use the web api the email is an alternate key, so you can retrieve and update data using the emailaddress1.¬†So if you push data from your ERP solution you don’t have to create a mapping between MSDYN customerid and ERP customerid.

Want to be cool and fearsome as the CRM Viking? Send your tips to jar@crmtipoftheday.com.

3 thoughts on “Tip #1028: Prevent duplicate contacts the Viking way

  1. Phil says:

    Just be aware that inactive records are still considered when checking the keys.

  2. Adele says:

    Great tips. I consulted your tips a lots. Thanks
    I have a requirement that alternate key only applies to active records, not on inactive records. Do you have any tip how to implement? Thank you

    • Hi Adele,

      not sure what you mean by applying alternate key to active records only. The alternate key is just a unique index. Do you mean that you need to enforce uniqueness only on active records?

      Thanks

Leave a Reply to George Doubinski Cancel reply

Your email address will not be published. Required fields are marked *