DYNAMICS 365 CREATE AUTO-NUMBER FIELD WITHOUT CODE

Auto-numbering was, is, and will stay a main request to a lot of organizations when it comes to records' uniqueness whether working in Sales, Customer Service, or any other area.

As for the consulting company, auto-numbering was a development task, where the developer has to write a bunch of code and test it in order to achieve this mission.

However, in PowerApps and CDS, you can now create auto-number fields without writing a single line of code.

  1. Login to your PowerApps maker https://make.powerapps.com and open the solution you are working with
  2. Open the entity you want to create the auto-number field and create new field
    Note: I am using the Account entity, but you can use any entity
  3. In the right Pane, select the Data Type dropdown > Autonumber in the Text section
    Autonumber 1

  4. New options will be displayed based on the Autonumber type selected
    • String prefixed number
      • Prefix: String to define the text value that will be used as a prefix in the auto-generated value
      • Minimum number of digits: Number to define the minimum number of digits of the sequence in the auto-generated value
      • Seed value: Number to define the start value of the sequence in the auto-generated value
      • Preview: Text that displays what the next three records might look like in the auto-generated value
      Autonumber 2

    • Date prefixed number
      • Date format: Dropdown options to define the date format that will be used as a prefix in the auto-generated value
      • Minimum number of digits: Number to define the minimum number of digits of the sequence in the auto-generated value
      • Seed value: Number to define the start value of the sequence in the auto-generated value
      • Preview: Text that displays what the next three records might look like in the auto-generated value
      Autonumber 3

    • Custom
      • Format: Text to define the format of the auto-generated value. You can choose to enter static string and/or as many as you want of random string, sequence number, or date format
      • Seed value: Number to define the start value of the sequence in the auto-generated value
      • Preview: Text that displays what the next three records might look like in the auto-generated value
      Autonumber 4

  5. For the sake of this post, I created three fields for each Autonumber type in order to see the end result
    Autonumber 5

Bonus Tips:
  • After you delete a record, the auto number will continue to increment and will not regenerate the deleted sequence
  • This option is only available when you open the solution in PowerApps and you will not be able to do it using the D365 interface


Hope This Helps!

Comments