Kashif Nizam Qureshi

Resetting SharePoint List ID

Leave a comment

Use the list name and sub site name to reset SharePoint list ID. Sub site is necessary because same list name could exist in another sub site.


Declare @ListID uniqueidentifier
Declare @ListName nvarchar(500)
Declare @SubSiteName nvarchar(500)


Set @ListName='AppLog'
Set @SubSiteName='Sample Order'

Select @ListID =
--Select
 tp_ID From [dbo].[AllLists]  
Where tp_Title = @ListName --'AppLog' --'ChemicalCustomerClaim'
and tp_WebId = (Select Id from dbo.AllWebs where Title= @SubSiteName )

SELECT * FROM [dbo].[AllListsAux] 
where ListID= @ListID --'A466A9AE-C6A8-4A1A-8DBB-CA3D2122268B'


--UPDATE dbo.AllListsAux set NextAvailableId=1 
--where ListID='A466A9AE-C6A8-4A1A-8DBB-CA3D2122268B'


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s