Generate Auto Number for entity without code in D365 CRM

We all know that Microsoft has the auto-number feature, but it has its own prefix for auto-number and its own sequence for generating auto number.
There are many ask from the users that the auto number for an entity should have their org name as a prefix and the random number should be in a particular format.

Today, let’s learn how to implement the auto-number functionality for an entity with the prefix required by business user.

Before we start we should have D365 System Admin rights with us.

Login to D365 CRM online and Navigate to Power Apps portal.
Below is the Power Apps Home page. Click on Data, which gets expanded and show us the entities currently present under the logged in CRM Instance.

Figure 1: Power Apps Home Page

Select the desired entity, I am selecting Account entity.

Figure 2: Select Account entity

The below tabs under the yellow box are the one from where we get to know about the Fields, Relationship, Business Rule, Views etc. present under Account entity.

For achieving the Auto Number functionality, we will create a new field by clicking on “+Add field” button.

Figure 3: Entity details and adding new auto number field

Provide Display name to the field and change the datatype to “Autonumber”.

Then let’s change the value under “Autonumber type” field to Custom. Under Format field we can use custom auto number format.

Seed value is by default 1000, we will be using the same.

Depending on the combination of Format and Seed field. We get the sample output under Preview.
Now, hit the “Done” button.

Figure 4: Create Auto-Number field

Click on Save Entity.

Figure 5: Save the changes done on entity

Now, let’s navigate to our CRM screen and open the Account entity under customization where we can decide where to place the newly created autonumber field (Acc Account Number) on the Account Form and Publish the change.

Figure 6: Field placed on the form, hit the save and publish button.

Going to Account entity and creating a new account. When clicking on Save, we get to see that a random auto number got populated under the Acc Auto Number field.

Figure 7: Auto Number generation

Hope this helps you. Enjoy D365 CRM!

Design a site like this with WordPress.com
Get started