web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Alternate key

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to create a alternate key for emailaddress1 in contact entity. Since the entity has already thousands of records having empty email address, it doesnt allow to create alternate key. I need this to be created, because, the third party vendor passing emailaddress as the reference for the contact entity record. Is it any work around to create the alternate key. 

I have the same question (0)
  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hi,

    You can create an alternate key with a null value in your records. You must not have any duplicates (except for nulls).

    If you have empty strings, you can replace them with null in order to create your key.

    Example:
    I have records with null in emailadress1.

    pastedimage1682959549622v2.png

    But, I can use the alternate key to find an account.

    pastedimage1682959417637v1.png

    Used query:

    /api/data/v9.2/accounts(emailaddress1='someone6@example.com')

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Blank (null-valued) fields shouldn't be a problem creating alternate keys - I'm pretty sure it's related to duplicates within the table.

    I experienced a similar situation and in order to identify duplicate records I used the following approach:

    1. I created a DB and exported the data from the table into it.

    2. I run a query to identify duplicated emails.

    3. Having duplicated emails through the dataverse interface I just found records and either deleted duplicates or updated emails to remove that constraint.

    An alternate approach you can rely on is duplicates detection - create a duplicate detection rule by your email address and run the duplicates detection job. Go and fix the results of that job.

    Once you have your duplicates cleaned up - you would be able to enable your alternate key.

  • Suggested answer
    ankit_singhal Profile Picture
    560 on at

    I think there is no way OOB in online CRM but you can write custom code and apply that on pre validation

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans