c# - SharePoint 2010 client object model, clear content type collection -
i have sp.contenttypecollection document library. i'm trying add together selected 1 site's content types. need new default content type library.
thus, i've copied document library's existing types list. want clear content types , add together new 1 first becomes default. add together others copied.
problem: can't find way delete 1 or of content types in collection.
help? :-) in advance.
you can't delete element sp.contenttypecollection list. article provides code snippet delete content type using client object model , code doesn't check if content type beingness used cannot delete content type beingness used.
the code snippet utilize function contenttype.deleteobject delete content type, please aware of exceptions in msdn link.
c# sharepoint client-object-model contenttype
No comments:
Post a Comment