Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Alternate keys fails

Posted on by Microsoft Employee

I am trying to create an alternate key on contacts using just the "mobilephone" field. For some reason the status shows failed. The error message I am getting is this one:

"The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.ContactBase' and the index name 'ndx_for_entitykey_new_mobilephone_key'. The duplicate key value is (0)."

Any ideas of what might be wrong?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Alternate keys fails

    Thank you @aidenkaskela, that helped me too.

  • Armine DD Profile Picture
    Armine DD 280 on at
    RE: Alternate keys fails

    Thanks, your suggestion helped me too!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Alternate keys fails

    Thank you! That worked!

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,692 on at
    RE: Alternate keys fails

    Hi,

    The alternate key can't be created because it would be violated on create - i.e., you already have two contacts with the same mobile phone number. If you clear out the duplicates you should be good to go.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

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