Sharepoint 2010 - Delete this List link missing

If menu item "Delete this List" in list settings is missing or, in Sharepoint Designer 2010, you receive error in deleting list/library, may be problems is for AllowDeletion property of the List/Library.

Once you declare an item as a record in a list, the corresponding lists SPList.AllowDeletion property is set to False. This is why you no longer see the "Delete this List" link in the list settings and is intended to protect lists with items declared as records.

You can use PowerShell to delete the list (using the SharePoint 2010 Management Shell):

$assignment = Start-SPAssignment
$web = Get-SPWeb -Identity "http://yoursite" -AssignmentCollection $assignment
$list = $web.lists["Your List Title"]
$list.AllowDeletion = $true
$list.Update() #after this is entered, the "Delete this List" link will reappear in the UI for the List Settings
$list.Delete() #this will delete the list
Stop-SPAssignment $assignment

Yes, it's works.

Comments

  1. Thanks for your information.
    however i have deleted all the list items.
    but still i cant see the delete this list option

    even i have deleted in all recycle bin

    do you have any idea?

    ReplyDelete
  2. Hi.
    The script delete the list.
    You can run script without row "$list.Delete()", then you should see the link for manually delete list..

    ReplyDelete

Post a Comment

Popular posts from this blog

Sharepoint 2010 - Enable/Disable Ribbon Button with EcmaScript

Sharepoint 2010 - Customizing Quick Launch with pages

SharePoint - Add button Apply to List Item Edit Form for Saving Item without closing form