Home Power PlatformsPower Apps Dynamics 365 autonumbering without code or workflows

Dynamics 365 autonumbering without code or workflows

by Angelina Jacobs
Dynamics 365 autonumbering without code or workflows

Dynamics 365 environments come with limited autonumbering capabilities, for only a few out of the box tables, and with formats that leave much to be desired. Not a fan of the Case or Invoice numbering? Have a custom table that you’d like to add an autonumbered field to? Or perhaps you’d just like the system to automatically set the Account Number column in your Account table. Say goodbye to the need for plugins and/or custom workflows. Dynamics 365 autonumbering without code or workflows can be accomplished in your Power Apps solutions with an Autonumber data type.

Create a new column or use an existing text column

If creating a new autonumber column, follow the same steps you would for any new column, but select the Autonumber Data type from the list. Follow the additional formatting steps as outlined below in the Account example to complete your creation.

Dynamics 365 autonumbering without code or workflows

In this example, I want the system to autonumber my Accounts and, instead of creating a new column, I’ll use the out of the box Account Number.

  • Switch Data type from Text to Autonumber
autonumber data type
  • Select your preferred Autonumber type
    • String prefixed number (incrementing number with an optional set prefix, eg. CRMD-####)
    • Date prefixed number (incrementing number with a formatted date prefix, eg. 2021-03-01 – ####)
    • Custom (more advanced formatting and combinations)
String prefixed number
  • Set your preferred format; changes based on your selected type
    • String prefixed number: choose if you want a prefix or simply leave blank for sequential numbering only
String prefixed number
  • Date prefixed number: select preferred date format for prefix
Date prefixed number
Custom autonumber

  • Set minimum number of digits
    • This is the minimum number of digits your sequence will contain, eg. ‘2’ = 01, 02, 03… ‘4’ = 0001, 0002, 0003…
      • As your number sequence increases over time, it could eventually be longer than your set minimum
  • Set seed value
    • This is the starting value for your numbered sequence
      • For new columns, this will be set to 1 if nothing is entered, although you could set the seed to 1000 if that is your preferred starting value
      • Be careful if updating an existing autonumbered column – leave blank if the system should continue from the last set value or be sure to set higher than the last generated value to avoid possible duplications
    • Seed value is not included in solutions and needs to be set if moved from one environment to another
  • Review setup, including preview and advanced options, to complete your column set up according to your organization’s needs

Additional Tips – Dynamics 365 autonumbering without code or workflows

  • Autonumber columns on forms should be set to Read-only, and/or have field security enabled to prevent manual input and possible duplication
  • Remember to check/set the seed value of any autonumber columns included in solutions moved from one environment to another, eg. Sandbox to Production
  • Confirm the max length of your column is suitable for the format, eg. Prefix+random string+date+number can include many characters over time
  • It is important to note that this data type is available only under the Text category and is not supported in the classic solution explorer

Related Articles

Leave a Comment