Tuesday, March 17, 2015

Unable to remove a field from a SharePoint list via UI


In some cases (such as the "Page Content" field found under the Page Layout columns) it is not possible to delete a field from your list once you have added it. This is because by default some fields have their property set to Sealed="TRUE". Thus, you will not be able to delete the field via the UI, forcing you to use a coding solution. This can be achieved via the following PowerShell script:

$web = Get-SPWeb http://yourweburl
$list = $web.Lists["YourListName"]
$field = $list.Fields["Page Content"]
$field.AllowDeletion = $true
$field.Sealed = $false

No comments:

Post a Comment