Back to Basics # 24: Create Auto Number Field in Dynamics CRM

Introduction:

In Dynamics / Power Platform at times we require automatically generate auto number for an entity which has the alphanumeric characters. Microsoft offers custom format auto number option as well.  In this example let us see for contact entity how this can be achieved to generate automatic Id creation for contact record.

Step 1:

Login to the required environment and go to the required solution where you need to do customizations as shown below figure

Step 2:

After Step 1, select solution and navigate to contact entity and then click on add column and provide Display name as Tag Id and Name as tagid and under datatype select Autonumber type as shown in the below figure

Step 3:

After Step 2, we can provide Autonumber type as String prefixed number or Date prefixed number or Custom so in this example I have selected String prefixed number and provided

Prefix – ID

Minimum number of digits – 6

Seed Value – 100000

And click on Done and Save tableas shown in the below figure

Step 4:

After Step 3, search for the field Tag Id and you should see it in the list of created columnsas shown in the below figure

Step 5:

After Step 4, add created Tag Id column in Contact Entity Main Form by navigating to Contact Entity Main Form and place Tag Id column inside and make it as read-only and click on Save and Publish

Step 6:

After Step 5, Go back to solution and publish all customizations as shown in the below figure

Step 7:

After Step 6, Go to Contact entity(table) and create new contact record and observe that Tag Id column is automatically populated as shown in the below figure

Note:

  1. Make sure auto number data type is selected.
  2. Specify format as per the business requirement.
  3. Publish All Customizations without fail as specified in Step 6.

Conclusion: In this way, one can easily use auto number data type for a given field in Dynamics CRM

2 thoughts on “Back to Basics # 24: Create Auto Number Field in Dynamics CRM

  1. Pingback: Rewind October 2021 – Common Man Tips for Power Platform, Dynamics CRM,Azure

  2. Pingback: Back To Basics # : Curated List of Articles in a Single Page – Common Man Tips for Power Platform, Dynamics CRM,Azure

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