Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Months ago I made a content type that inherits from the Announcement type. I thought I put it in just three sites to test the content query web part, but I can't delete the type. How can I see which lists have my custom content type applied to them?

I only have the web interface or SharePoint Designer, my access is limited to SharePoint designer and I have essentially no admin support for requests like this.

EDIT
http://blog.tylerholmes.com/2008/02/deleting-content-types-in-sharepoint.html

I found this article, but I don't have access to the database nor to the rights to run anything onto the server

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Do you have a small number of lists to check? If so the easiest way will be to check the list settings menu (Settings > List Settings) for each of the lists. Check if your custom content type is listed under the Content Types heading. If it is listed there then you can delete it but you will have to make sure there are no items using the Content Type first.

If you can't see a heading under the list settings for Content Types then that list has not been configured to use multiple Content Types and your custom Content Type will not be used in that list.


Update: So based on your feedback this really is not an option. If you have access to the server (a big if) then I suggest you use a tool like SharePoint Manager to inspect the properties of the Content Type in question. SPM provides a property for Content Types called Usages (SPContentTypeUsage) which will give you the exact info you are after:

alt text

share|improve this answer
    
100+ sites to check, some with many many lists. I have been doing guesses but I was hoping for a more concrete answer –  MrChrister Mar 29 '10 at 21:15
    
In that case a manual check like what I suggested above is not going to be feasible. Do you have admin access to the server? –  Nick Hadlee Mar 29 '10 at 21:32
    
Also are these all in the same site collection? –  Nick Hadlee Mar 29 '10 at 21:32
    
No admin past site collection admin, same site collection –  MrChrister Mar 29 '10 at 21:43
    
Sorry didnt see your last answer until I reposted. If you can get an server administrator to assist you then the above will work. –  Nick Hadlee Mar 29 '10 at 21:48

The fool-proof way to find all instances of a content type is to leverage the structure of the content type ID. Remember that these IDs are structured to indicate the 'lineage' - so where a content type is used on a list (i.e. a list content type), it's ID will start with that of the parent content type (i.e. the site content type). Example:

0x0102 - Event 0x0102006E505C7A7E734EB29D6F970175198B3F - Custom event ctype (derived from Event) 0x0102006E505C7A7E734EB29D6F970175198B3F0066B0C4D95D80D440824C69C654C14665 - Instance of ctype on a list

(The part of the ID specific to the derived type is separated by '00' in the ID - that's the 'separator'.)

So, the best way would be to query the site collection for items with a content type which starts with your content type ID, e.g. using SPSiteDataQuery. If you don't have permissions to run code on the servers which would do this, you can use the Content Query Web Part (MrChrister was on the right lines) using the technique documented in How to: Customize the Content Query Web Part by using Custom Properties

share|improve this answer

My hacky solution:

I added a Content Query Web Part and set it up to display only items from the specific type. I used the links the CQWP returned and found the lists. They happened to be announcements, so this worked pretty quickly.

share|improve this answer

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.