Tip #1179: Add a dash of dash to your autonumbering


Jonas “The Shuffler” Rapp reports: when modifying autonumbering for built-in entities like case, always include a dash in the pattern to stop Dynamics 365 from self-combusting.

Long story

One of the awesome users of the Auto Number Manager for XrmToolBox managed to break the system settings for Auto Numbers in Dynamics 365, so he called me up to see if I could find the problem.


The Auto Number Format of the Case Number (ticketnumber) attribute on the Case (incident) entity had been changed from the default value:


To a custom format:


And now it was no longer possible to open the Auto-Numbering dialog in Dynamics 365.

I see four potential problems here:

  1. The prefix is four characters – will that fit?
  2. There is no dash between prefix and number
  3. The number is seven digits long
  4. There is no random string at the end

After some investigation using the number one troubleshooting methodology –  some simple trial-and-error – I came to some conclusions:

  1. Prefix may be even longer than that, I tried with CASENUMBER and that worked fine too
  2. Skipping the dash makes the dialog explode like above
  3. Seven digits works fine, even though the UI in the dialog will only show 6, there is no 7 available
  4. Works fine without random string, but in the dialog it still looks like it has the random suffix


So make sure you keep a DASH between your prefix and number when you are changing Auto Number Format for out of the box number attributes!

Happy numbering!

Leave a Reply

Your email address will not be published. Required fields are marked *