CSC515505. Prevent SharePoint list from deletion.

Description

If we don't want to let the users to delete the configuration list in SharePoint provide template with attribute AllowDeletion="FALSE"

Resolution

Add attribute AllowDeletion="FALSE" to the list template.

How to set AllowDeletion property for SharePoint list programmatically with PowerShell
#Get the Web
$web = Get-SPWeb "http://yoursite.com"
 
#Get the List
$list = $web.Lists["Design Documents"]
 
#Set the "AllowDeletion" property
$List.AllowDeletion=$true
$List.Update()

Links

ListTemplate Element

Last edited May 26, 2014 at 4:20 PM by dvd73, version 8

Comments

No comments yet.