SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to remove an Existing Site Column from a list.

This has already been answered here: How do you remove fields from a custom list in SharePoint that have been added via the 'Add from existing site columns' menu item?

The problem is i don't understand how he is doing it? Is he using Powershell?

share|improve this question

That code is C# though the powershell isn't that different and would probably look pretty close to this :

$site = Get-SPSite "UrlToSiteCollection"
$web = $site.OpenWeb("/Url/To/Web/Containing/List")
$list = $web.Lists["CustomTest"]
$f = $list.Fields["Page Image"]
$f.Sealed = $false
$f.Update()
$list.Fields["Page Image"].Delete()
share|improve this answer
    
I will give that a try. Thanks! – Capurnicus Apr 15 '13 at 18:20
    
Just fixed a typo on a variable name – Dave Wise Apr 15 '13 at 18:24
1  
maybe a AllowUnsafeUpdates=true would be needed prior to chaning Web structure – Marius Constantinescu - MVP Apr 15 '13 at 19:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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