CRM Entity–Primary Field properties

All entities you create in CRM require a Primary Field. This is described on the second tab of the entity property window, as seen below:

image

Now, there are certain things to keep in mind when generating this primary field for custom entities:

  • This field is used for display in the lookup fields of related entities.
  • CRM requires this field to be of Type nvarchar and format of text.
  • You can define the length of text
  • You can define the business requirement level, even though I can’t see it being anything other than Business Required (maybe there are specific cases, but I have not seen any that stands out as a good example).
  • After the entity is created and saved, the data fields become read-only. Don’t worry, you can still change some of the properties by going to the Fields view, and opening that field’s properties window. You can then modify the Name, if it is Searchable or not, the Business Requirement level as well as the maximum length.
  • The primary field of an entity is set on creation, you can not change it afterwards.

NOTE: Custom Activities, as a type of Entity behave a little different when it comes to the primary field. They do have a pre-defined field names Subject.

Hope this helps clarify things up a little,

Enjoy!

Advertisement

One thought on “CRM Entity–Primary Field properties

Add yours

  1. Hi . I am new to CRM Dynamics and while I learn it I found that this field is more confusing than having concrete use. Why? Because when I create an entity, first I am looking to create my primary key and then to reference that key to other entities.
    This primary field I see it used only on simple entities who may define simple state and that is all. On complex entities it must be hidden because it is not unique and how the customer may differentiate the records in views if they are the same? My logical step is to replace them with a unique key since the entity’s primary key is a GUID…

    Thx.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: