Reset List Item ID in SharePoint 2013 List

Reset List Item ID in SharePoint 2019 List
InfoPath alternatives for form designing SharePoint

Here we will discuss how we can reset list item id in a SharePoint 2013 list. Every item will have one id associated with it. If you have 5 items and you delete all 5 items from the SharePoint list then next time if you will try to add one item to the list then the id will starts from 6 not with 1.

Also read:
– CAML Query Builder in SharePoint 2013 Online

– Create Visual WebPart using Visual Studio 2013 in SharePoint 2013

– SharePoint 2013 Add Read more link in list view for multline rich textbox

Also there is no out of box way you can reset the id apart from resetting the value in the content database.

First Approach to solve the issue:
One approach you can do is, you can Save the List as a template and can use the same template to create a new list. You can follow this article to check.

Second Approach:
The other way is you can modify in the database.

Before opening your database for modification, make sure you have the list GUID.

AllListsAux table in content database maintains information about Item count and Id details for all lists.

Then open the database and run the below command:

SELECT * FROM [ContentDBName].[dbo].[AllListsAux] where ListID=’GUID of the List’
Example:
SELECT * FROM [WSS_Content].[dbo].[AllListsAux] where ListID=’B13CC473-6187-4478-A0DD-853E83AA6F9D’

It will display like below:

Reset List Item ID in SharePoint 2013 List
Reset List Item ID in SharePoint 2013 List

Now if you will add item to the list, the next id will be generated like below:

Reset List Item ID in SharePoint 2016 List
Reset List Item ID in SharePoint 2016 List

Then Run the below command to reset the value:

UPDATE [Content DB].dbo.AllListsAux set NextAvailableId=1 where ListID=’GUID of the List’

Example:
UPDATE [WSS_Content].dbo.AllListsAux set NextAvailableId=1 where ListID=’B13CC473-6187-4478-A0DD-853E83AA6F9D’

Now if you will add an item to the list, then the item will be reset (Item ID will start from 1) like below:

Reset List Item ID in SharePoint 2019 List
Reset List Item ID in SharePoint 2019 List

But Microsoft strictly do not recommend to change anything in the content database. Take special care while doing this kind of modifications.

Similar SharePoint 2013 Tutorials

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply