When tried to delete some columns from list using GUI, Some of them don't give me option to delete.
Problem: I Can't delete column if it is sealed, hidden, or readonly
Solution: Change values of these properties to false before trying to delete
You can use PowerShell to change these properties and remove column from List like below:
$web = Get-SPWeb -identity SiteUrl
$list = $web.Lists[listName]
$column = $list.Fields[FieldName]
$column.Sealed = $false
$column.Hidden = $false
$column.ReadOnlyField = $false
$column.Update()
$list.Fields.Delete($column)
Problem: I Can't delete column if it is sealed, hidden, or readonly
Solution: Change values of these properties to false before trying to delete
You can use PowerShell to change these properties and remove column from List like below:
$web = Get-SPWeb -identity SiteUrl
$list = $web.Lists[listName]
$column = $list.Fields[FieldName]
$column.Sealed = $false
$column.Hidden = $false
$column.ReadOnlyField = $false
$column.Update()
$list.Fields.Delete($column)
No comments:
Post a Comment