Notifications
Announcements
No record found.
What is best practice with regards to Primary Field when creating a new custom entity. When working with other SQL and Access systems the primary key typically was just a system generated sequential number. Is this the same with Dynamics 365 entities or is there a better way?
Hi Andy,
Thank you for your query.
In D365, This field must be a Single Line of Text field with the format of Text. Each custom entity has a primary field. This is defined in the Primary Field tab.
docs.microsoft.com/.../create-entities
Hi Protim, thanks for the info, I am really trying to understand what purpose the primary key serves. I assume it is a unique identifier for each record added to the entity. I am trying to establish what the field should be. With other systems I have worked with, typically it has been a sequential number but this Primary key is a text field. Currently I have created an entity to hold software license information against an account. An account may have multiple licenses for finance, CRM etc. In addition we may not have the license no. , therefore what should I use?
When you create any custom entity in D365 one Id and name field automatically create which basically identifier of an entity record. Name field is for read purpose or you can say its name of a record and the id(primary key field) for a CRM entity is the globally unique identifier(GUID) that CRM uses to reference everything within the CRM system.
For more details refer below link: https://neilparkhurst.com/2017/05/25/mb2-716-microsoft-dynamics-365-customization-and-configuration-alternate-keys/
Thanks alot Maulik. it confirms what I discovered when I started to look in more detail at other default entities and also played around with creating a new one. I noticed that the system generates [entityname]id as well as the Name primary key by default. I now realise that the primary key is not the unique id but a field that you can use to give a 'title' to the record.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 137 Super User 2025 Season 2
#ManoVerse 57
Jimmy Passeti 50 Most Valuable Professional