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 :
Microsoft Dynamics CRM (Archived)

How to know if an attribute is unique

(0) ShareShare
ReportReport
Posted on by

I tried to create a record in Dynamics CRM 365 (with c# code), I got an exception "cannot insert duplicate currency record. Currency with the same currency code already exist ... ". So here the currency code attribute is unique.

My question is how to know if any attribute of any entity is unique.

I tried to retrieve the KeyAttribues of the previous entity but it is empty.

Any help please.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Actually, I want to know if any attribute is unique or not (it's property), like these ones :

    msdn.microsoft.com/.../microsoft.xrm.sdk.metadata.attributemetadata.aspx

    But I can't find something like that.

  • Suggested answer
    meenoo Profile Picture
    7,316 on at

    Hi E2M,

    Is this what you are looking for?

    community.dynamics.com/.../metadata-and-entity-metadata-browsers-in-microsoft-dynamics-crm-2015

    Thank you.

  • Community Member Profile Picture
    on at

    In that list of property, I'd like to find something such as "IsUnique"

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans