Solved

SharePoint 2010: Is it possible to replace content type from existin libraries?

Posted on 2013-11-25
3
564 Views
Last Modified: 2013-11-26
Hello. I have multiple document libraries with custom content type (content type hub). I would like to replace existing content type with my fancy new content type.  Is it possible to create ps1/c# code that would do this? Should I expect problems? I guess SharePoint may not allow my code to remove existing content type.
0
Comment
Question by:tolppa
3 Comments
 
LVL 31

Accepted Solution

by:
Jamie McAllister MVP earned 250 total points
ID: 39673974
In this thread I posted some code to change content types; http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e61f920c-b9ba-44a9-8502-3243621bcdc8/adding-a-content-type-document-to-manyall-libraries-in-a-site?forum=sharepointgenerallegacy

This is managed code rather than powershell, but it can be adapted.
0
 
LVL 8

Assisted Solution

by:vaderj
vaderj earned 250 total points
ID: 39675512
You can have two content types assigned to a list.  You will not be able to remove the original content type of that list if there are any list items that are using that content type.
You can switch a list items content type via the list item properties, or you can also do this via code / PoSH script
0
 
LVL 1

Author Closing Comment

by:tolppa
ID: 39679882
Thanks.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question