Its always been an excitement to work on Beta’s and RTM’s of any product.
These days I have been working on SharePoint 2010 based products. While working on Content Types in SharePoint 2010 I faced few challenges,
I refered to the link : http://msdn.microsoft.com/en-us/library/ms460224.aspx to work on content types either programmatically or through xml’s.
In 2010, if you create content type (SPContentType) and associate or add that content type to sharepoint list (SPList) on activation of feature. Now in deacivation of feature if I have written logic to delete the same SPList and later if I try to delete the content type from site then it gives error saying content type is in use.
To survive from this couple of tips,
- Always check the usage of the content type before deletion
- Always remove the content type association from list and then delete the list
- In case if you have forgotten to remove the content type association from the list and you have already deleted the list and now if you want to delete the content type, use recycle bin to restore a list ( tip from twitter.com/danmc) and then first remove the association of content type from th list and then delete the content type.
I have always suffured being an aggressive developer especially with RTM’s and Beta’s…still love microsoft’s products
Success!!!!