Notifications
Announcements
Hi All,
1) I have a autonumber column in a Entity "Save". And I created 3 records in it. I deleted all the records but the autonumber column starts from 4. How can I reset the counter so that it should start from 1?
2) Suppose a user deletes a record having value as 2 in autonumber field. then suppose user enters new data then how can I allow user to take available autonumber, in this case it will be 2.
Please help @EricRegnier
@HSheild
@jlindstrom
Hi @Anonymous,
Unfortunately out-of-the-box that’s the standard behavior and the seed cannot be reset to the number of records remaining in the system. This is by design, actually by Azure SQL/SQL Server. Imagine for example, record 1, 2, 3 created, and then 2 removed. Record 3 stays as 3 and not reset to 2. Later record 4 gets created, it is set to 4 and not 2. That would actually not only be confusing but extra work for the system to reprocess the auto numbers every time a record gets deleted. It would also be very error prone to users and external references to these auto numbers. Ex. An invoice number (auto number) is generated, then later that actually invoice number changes...not good! Once set, they are meant to stay immutable.
Hope this clarifies...
Thanks @EricRegnier ,
Can I link autonumber field of two entities? Suppose I have table A and table B then If I insert record in table A then the autonumber field will be 1. Then if I inserts record in table B then there the autnumber field should be 2. Is this possible?
The autonumber field is just a text field and holds no logic in it itself (just holds the outcome of the sequence generated - and can be overwritten after it has been populated without impacting the next sequence generation). When you configure the autonumber it sets up a sequence (not visible to you), you can reset the 'seed' of the sequence but this is a configuration (but it can be done via a .Net plugin) not really something you would do when someone deletes a record etc. The sequence is per Entity/Table not able to handle complex logic etc.
Not automatically as records get inserted/deleted, but you can reset the seed manually (for example in Dev environment) in the Maker portal:
Is there another way to do it as I don't have access to the Dev section?
Hi @souzaths, what do you mean by the dev section? The maker portal (make.powerapps.com) is the default way but there's also a tool in the XrmToolBox to manage autonumbers: https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.AutoNumManager/
Hope this helps!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268