Solved

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

Posted on 2013-11-25
3
569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 32

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

724 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