Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Deleting an invalid field progromatically

  Asked By: Eleanor    Date: Dec 01    Category: Sharepoint    Views: 1239

I have a custom field that I created that was causing issues. I ended
up deleting the field in the Site Columns Gallery. Unfortunately, it
was included in a content type that got added to the entire site. When
I go to the pages list in any site I can see it in the Customize list
settings screen with the name of the field and a link to Delete this
Invalid Field.

Is there a way to programmaticallyremove the invalid field? When I try
to do a foreach on the web.Fields the code throws an exception and I
can't remove the item. I have also tried doing a
web.Fields.Delete(InternalName) but that throws an exception as well.
Can I do this in a script or do I have to click through every site and
delete it manually.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Deleting an invalid field progromatically Or get search suggestion and latest updates.