you're reading...
Dynamics CRM, Dynamics CRM Master

Auto Numbering Solution for CRM 2013 Online

A number of times we come across a requirement to create a auto-incremental number for a variety of records in Dynamics CRM. The usual solution for this scenario has been developing a synchronous plug-in to generate an auto-incremental number and then assign to the record. Any solution involving developmental work has been costly to the customer and been subject of heavy testing activities because of risk involved with custom code.

Using CRM 2013 Synchronous workflows, auto-incremental numbers can be achieved without writing a single line of code. Some of custom auto-incremental solutions uses SQL table’s IDENTITY Columns or SQL 2012’s SEQUENCE feature and makes the solution difficult to deploy in a Dynamics CRM 2013 Online deployment.

Here I would discuss a solution which is completely native to Dynamics CRM and hence easy to deploy in CRM 2013 Online deployments. Follow the below steps to create an auto numbering solution for any entity, for example a CONTACT ID.

 Step 1: Create an entity “Auto Number Definition”.

Auto Number Definition

Step 2: Create the following fields for Auto Number Definition entity.

Auto Number Definition Fields

Step 3: Create another entity “Auto Number Request”.

Auto Number Request

Step 4: Create the following fields for Auto Number Request entity.

Auto Number Request Fields

The idea here is to create an Auto Number Request record with every Contact record creation and Auto Number Request will generate a New Number using an Auto Number Definition record. The New Number would then be copied to the Contact record.

Auto Numbering Process Steps

Step 5: Create a synchronous workflow on Auto Number Request entity.

Auto Number Request Create Workflow

Step 6: Create a Auto Number Definition Record for the contact entity.

Auto Number for Contact Record

Step 7: Create another synchronous workflow on Contact entity.

Contact Auto Number Workflow

About Dipankar Bhattacharya

Dipankar is a CITA-F, ITIL certified professional specializing Customer Relationship Management (CRM) and Cloud Computing. He is a certified Microsoft Dynamics CRM specialist and Architect and have been working in the field of CRM for enterprise customers across the globe.


7 thoughts on “Auto Numbering Solution for CRM 2013 Online

  1. Hi, Dipankar

    I tried all the steps but when i am creating new contact.. No 1 is repeated. and not auto-incremental number.


    Posted by Sandeep | August 28, 2015, 5:42 PM
  2. Hi, This is looking good compared to most approaches that i have taken for Dynamics CRM online. Can you just expand on what you mean by: Step 6: Create a Auto Number Definition Record for the contact entity.

    I am not quite sure how to do this step although the rest has been very clear.

    Many thanks,


    Posted by testsite | October 2, 2015, 9:44 PM
    • Step 6 suggests to create a new record of Auto Number Definition using the values specified.

      Posted by Dipankar Bhattacharya | October 4, 2015, 5:07 PM
      • I have completed all the given process above but I could not get auto number generated on my contact form i.e ID and also Auto number request new record is also not being created.
        I know somewhere I must be missing something.I tried to create the above given process twice or thrice but no improvement!!
        Any help is welcomed

        Posted by Ankush | October 14, 2015, 2:28 PM
  3. Will this work in 2011?

    Posted by Lynne Laake | November 11, 2016, 2:23 AM


  1. Pingback: A working Incremental Number ID Solution (with different prefix’s) using Syncronous Workflows - Microsoft Dynamics CRM Community - December 5, 2014

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Blog Stats

  • 61,049 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 565 other followers

My Book

Follow me on Twitter

%d bloggers like this: