0

I created a column on my root site's content type and now cannot delete it. It is somehow locked as "Read Only" and I have tried PowerShell and SharePoint Designer 2010 and every option I could find to no avail. This is on our top level site and I am afraid this additional "Name" column could conflict with other fields and will cause problems down the road. I cannot delete the whole content type because this is a live site with hundreds of lists associated with it.

Any help or advice would be greatly appreciated!

badContentType

0

Here is the poowershell script to delete the Column from Content Type.

#Attach to the web and content type
$web = Get-SPWeb http://portal
$ct = $web.ContentTypes["Sales Document"]

#Get link to the columnn from the web
$spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["Aliases"])

#Remove the column from the content type and update
$ct.FieldLinks.Delete($spFieldLink.Id)
$ct.Update()

#Dispose of the web object
$web.Dispose()

http://get-spscripts.com/2010/10/cant-remove-site-column-from-content.html

Note. Always Test it in Dev Farm or site 1st.

  • Here is what I typed into PowerShell and it didn't have any effect. code $web = Get-SPWeb rex $ct = $web.ContentTypes["Item"] $spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["Name"]) $ct.FieldLinks.Delete($spFieldLink.Id) $ct.Update() $web.Dispose() code – NinKenDo79 Aug 15 '14 at 17:18
  • column is still exist, after this? may be refresh the page, close the browser or reopen it – Waqas Sarwar MVP Aug 15 '14 at 17:27
  • Closed and reopened browser (IE 9.0) and it's still there. – NinKenDo79 Aug 15 '14 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.