views:

205

answers:

1

Greetings, SO Experts!

Is there a way to list out which Content Types use a specified Site Column in SharePoint? I'm going to have to delete a site column (it's gotten hosed under-the-hood) and re-create it, and I want to know which Content Types I need remove the Site Column from before I delete it.

Any thoughts?

+1  A: 

Yep, iterate through each SPSite, SPWeb, SPList, ContentType, and display where it is used. This would require custom code though :(

Otherwise you can get SharePointManager and use that too look through quickly.

Your best bet is to deal with the underlying issue that brought you down this path and that is using the web interface to create the content types. After some pain going this route, we have learnt the only way to do this reliably is to create a feature with the columns and content types defined in it and release it as a solution. This gives you the ability to set the content types and fields exactly.

It is a lot of work to release contentypes/fields, but it is worth it to avoid having to run code over an entire website to remove instances of a field gone wrong.

Nat
You've exactly confirmed what I was thinking. Thanks for your input, even though I don't like the news :)
Adam McKee