Solved

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

Posted on 2013-11-25
3
553 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

Suggested Solutions

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now