Table of Contents

Generate AutoNumber for any entities with easy configuration using power platform

Generate AutoNumber for any entities with easy configuration using power platform

Generate AutoNumber for any entities with easy configuration using power platform. Back in the old days, we had to write custom plugins to generate auto number to automatically assign sequential numbers to records being created for custom entities.

Earlier CRM had an option of assigning auto number for certain OOB entities(Like sales orders, Quote etc). For other systems & custom entities, we must write a plugin to get the auto number.

To overcome this issue of having to generate unique values always through custom code and to support the auto generation of a codes based on a given seed and format value, ‘AutoNumber’ data type was added in power platform.

Until now, the way to use new AutoNumber data type was to create a new field with the AutoNumber data type. This means, if you have been using a text field until now to store the auto-number generated through custom code and now want to switch to the in-built auto-number data type field, then you have to create a new one, you could not reuse the same field.

But now we have the option of changing the existing field data type (from string) to auto-number data type. Please see the illustration below:

Go to make.powerapps.com. Select the Entities under Data and select the entity you want to start the auto number process.

Select the Entities under Data

Select the field you want to change it to AutoNumber/ you can create a new field with the Auto number as data type.

Auto number

Once you changed the DataType to Auto Number. You have to select the Format using the below options:

  • String prefixed Number – You can decide your string.
  • Date prefixed Number – will start the autonumber with date prefixed.
  • Custom – You have option to decide your own way.

String prefixed Number

I am going to configure to show my auto number like PrefixedString-Currentyear-Numbersequence(BEG-2020-0001). Lets Start:

I choose custom as my autonumber type and write the below in format column
“BEG-{DATETIMEUTC:yyyy}-{SEQNUM:4}”
Seed Value is nothing but Starting value of the Autonumber. I select it as 1.

BEG-{DATETIMEUTC:yyyy

Click on done & Save once you have finished the configuration.

Create the record and you can see the auto number has been generated with the format you have selected.
Easily configure auto number

That’s it. We can easily configure auto number even for custom entities without code by using a power platform.
Happy CRMing !!!!!!!!!!!!.

Published By – Bala Subramanian

Recent Blogs

Our content is designed to keep you ahead of the curve and provide valuable information to support your business needs. Dive in and stay connected with the forefront of industry developments.

Dynamics 365 Commerce for B2B E-Commerce Success in UAE

E-commerce solutions like Microsoft Dynamics 365 have been providing support to businesses across the world.

Microsoft Dynamics CRM in the UAE for Better Customer Service

The customer relationship is the basis of success for every business. Discover how you can

Benefits for Distributors of Integrating a Website with Microsoft Business Central

eCommerce has changed the way of doing business. In fact, it has become the default

Schedule your free demo with us now!