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

I'm trying to delete a custom content type that I've created, but I'm getting an error when I try to do so:

The content type is in use. at Microsoft.SharePoint.SPContentTypeCollection.DeleteFromWeb(SPContentTypeId id, String strName) at Microsoft.SharePoint.SPContentTypeCollection.Delete(SPContentTypeId id) at Microsoft.SharePoint.SPContentType.Delete() at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.DeleteContentType() at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have gone so far as to delete all the document libraries on this site that have even used this content type in the past after deleting items that were using it but to no avail. There's nothing left on this site that could be using this content type, so I'm not sure why it won't let me delete it. Is there a way to remind Sharepoint that this content type is no longer in use or some way to get rid of this content type? I'm trying to test dynamic creation and usage of this content type.

Thanks very much in advance

share|improve this question
add comment

3 Answers

Use SPContentTypeUsages to find out where the content type is in use.

share|improve this answer
add comment

Check the Recyclebin and if possible delete the lib/list ( as there could be some in draft )

Hope it helps

share|improve this answer
    
Thanks - I have deleted all document libraries that were using this content type and emptied the recycle bins but the error persists. –  Music Magi Jun 3 '11 at 18:24
1  
I assume you have done this..but just incase..clean recyclebin both @ site level and site collection level. –  Vamsi Jun 3 '11 at 19:32
    
I had the same issue in SP2010. Emptying the Recycle Bin did solve the issue. Thanks! –  Regmi Nov 2 '11 at 17:10
add comment

Here is code you can use to delete the content type or report an error stating where it is being used.

Another place to look is workflows. Did you create a workflow for this content type?

And as Vamsi said, after deleting and removing from the recyle bin, check the site collection recycle bin _layouts/AdminRecycleBin.aspx as well.

share|improve this answer
add comment

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.