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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change the Primary Key...
Power Apps
Unanswered

Change the Primary Key in a Microsoft Dataverse table?

(1) ShareShare
ReportReport
Posted on by 6

How do you change the primary key in a MicroSoft Dataverse table created in Teams?

I have the same question (1)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @BlackCSI,

     

    The primary key for the tables created in Dataverse is the "Primary Name" column, this is not something that can be changed.  You can change the value on this field of course but you can not change to a different column on the table.

     

    Hope this helps.  Please accept if answers your question or Like if helps in any way.

     

    Thanks,


    Drew

  • BlackCSI Profile Picture
    6 on at

    Thank you!  I'll need to come up with a work around.

  • Hilko Profile Picture
    24 on at

    Hi BlackCSI,

    Did you find that workaround? I also would like the 'primary name' column to be generated automatically, but it seems completely locked...

    Looking forward to hear if you have found something...

    Regards,

    Hilko

  • Ram Prakash Duraisamy Profile Picture
    5,714 Super User 2026 Season 1 on at

    Hello @BlackCSI,

     

    As suggested by @dpoggemann there is no way of changing primary key, you can create an Autonumber field and you can use it as an Primary Column for the same. 

     

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have a table were the primary key and the primary name are NOT the same column. When I look under schema the key column is listed, but when I look under columns a different column is listed as the name. I want the key column to show up as the primary Name but I can't change it.

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

     

    Right, this can not be changed.  The PrimaryName column (whatever you call that column since you can change the name from the default Name to something else) is how you reference the record from the front end user experience in model-apps and how you relationships with lookup columns in other tables will show the value for that column.  Of course behind the scenes there is an actual GUID for every record as well...   Sorry this can not be changed.

  • JonathanDavey1 Profile Picture
    69 on at

    Problem. Teams Table Primary 'Name' Column is REQUIRED, bit we do not "require" it, so how do I disable it or select another Col such as a required # autonumber column?

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    Just for clarity....

     

    The Primary Name column is NOT the Primary Key.  It is the primary name of the record (and you can set it optional and leave it blank - but generally not recomended) it is what is displayed to users in Lookups and in a model driven app at the top of the Form after the record is created.  

    The actual internal primary key is a GUID that is held in a field with the same schema name as your table but with an "id" suffix eg for Contact it is held in contactid.

     

    Note: Lookups will always use the Primary Name column.

     

    If you need uniqueness on a column (other than the GUID) then implement and Alternate Key on that/those fields.

    https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-alternate-keys-reference-records?view=op-9-1

     

  • JonathanDavey1 Profile Picture
    69 on at

    Is it possible to use a different column as the Primary Name column that appears in Lookup choices?

     

    The challenge is what users enter TEXT into the Primary Name Column.  Especially if it's a default REQUIRED column (in Teams).

     

    Literally asking a dumb question just so it contains something! Instead I use it as composition col1&col2&col3, where I can define and control the content in those other cols: UserName&Date&Project

  • Gowri Halan Profile Picture
    262 on at

    @JonathanDavey1 You have work around for your scenario. You can make primary name field as locked. Use a Business rule or pre create plugin to populate this field using the desiered value you want. Note that this field is marked as business required, but you can change that setting to optional.

     

    Currently you cannot make another field visible in the related entity lookup. but can do above work around.

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard