Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have one Sample Document Library on SharePoint Online (office 365). this Library has 5 different document content type. And using this Library as a template i have created 300 new Document Libraries on this site. That all Libraries already has all 5 Content Type. but now I want to Add 2 New Document Content Type to those all Libraries.

Is it possible to do so ? and if possible than how can i do this thing ?

Any help will be appreciated.

share|improve this question

3 Answers 3

The easiest way for me is, writing managed client object model code in Console Application. Which will iterate through the created libraries and then updates the content types and order if needed.

And for future creating document libraries you have to update the template and then redeploy it.

share|improve this answer
    
This. Or CSOM through PowerShell if that is your thing. –  Gabriel Smoljár May 12 at 17:47

I think the only way is to add/order the new Content Types manually to the list template and to the existing document library instances since extensive PowerShell cmdlets are not supported or cmdlets which could add the new Content Type to all the existing document libraries programmatically. How to add Content Type to the document library in SP online

Here is the list of SharePoint online commands which are supported as of now.

share|improve this answer
    
thanks for your reply. I have done this thing using custom web-part. –  Vikalp Kapadiya Jan 4 '13 at 4:43
    
I thought you might want to look into some PowerShell based solution but of course object model makes it easy too. –  Falak Mahmood Jan 7 '13 at 3:52

This can be done using VS 2010 using feature activated. Essentially you write a piece of code that would traverse your site from root open all lists and add the new content types to them. You put this code into feature activated block so it is only executed once when you deploy the feature. Afterwords you can retract the solution and the changes will remain

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.