Friday, October 5, 2018

Create auto-number attributes - Dynamics 365 (online), version 9.x

With the Dynamics 365 (online), version 9.0 release, you can add an auto-number attribute for any entity. Still a UI is not provided by Microsoft and you can do this programmatically. 
This is not the same Autonumber that is available for some of the out of the box entities like case, invoice, order, etc in Settings > Administration section. Here you can add any string field as the auto number field.


Ref : https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/create-auto-number-attributes

Auto Number Manager for XrmToolBox, provides you this facility with a nice and user firendly User Interface.

Ref : https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.AutoNumManager/

But I found following two drawbacks in this new feature.

  1. After enabling the auto number for the field, there is no way to disable this at the moment. (Eventhough there is a checkbox in "Auto Number Manager" to disable this, it is not working at the moment. Delete attribute is not for deleting number format, it is for deleting the field.)
  2. The auto number will be increased even in failed attempt to create a record.Eg : Consider last sequence no is 100000. If next attempt of creating record fails and the successful record creation after that will not have the sequence number as 100001 and it will have the value 100002.





No comments:

Post a Comment