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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans