Notifications
Announcements
How do you change the primary key in a MicroSoft Dataverse table created in Teams?
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
Thank you! I'll need to come up with a work around.
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
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
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.
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.
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?
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
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
@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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268