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

when (by web interface) user access to a content type (in site settings -> content types) and adds or remove a column there is a flag near the end that says something like:

"Update all content types inheriting from this type?" YES / NO

If yes, every list in the site that uses the CT updates with the new column.

I'm in a project in which content types are deployed in a WSP. Whenever I update one of them the behavior is like "Update all content types inheriting from this type?" NO..

How could I change this setting setting it to YES? Is there a flag in the xml?

Thank you!

I see that when I retract from VS everything goes fine... So I tried to investigate WHAT VS does...

I tried this script:

Disable-SPFeature -Identity "f5768894-9568-49bb-8c11-354e2d42c6bd" -url URL  

Uninstall-spfeature -identity "f5768894-9568-49bb-8c11-354e2d42c6bd" -force

Uninstall-SPSolution -identity saviogd.wsp  -allwebapplications -force

Remove-SPSolution -identity saviogd.wsp -force

I'm gone to the SP folder and look for "something remains on it", but:

  • Feature Folder is no more installed
  • Layouts Folder is no more installed

So I may suppose I've done the same VS Operations... Now running an IISRESET, going to the Content Types section I found ALL Content TYpe installed and all columns remove... When I deploy again the CT has all the old data.

Checking the situazion when VS retract I see that there is no more my Content Types...

How can I get the same VS Result?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The two "official" ways to update a deployed content type are:

share|improve this answer
    
Just a question.. Way from visual studio if i deploy my feature it adds all content type (even new fields) but when I upgrade it by code it doesn't work? I think it is because VS does the retract and my upgrade script not.. If I made a script which uninstall the feature and reinstall again, does it installs the new version of CT? And do I loose any data linked to my CT? Thank you! –  Ziba Leah Jun 13 '12 at 15:07
1  
Uninstall+Install works for most things, but requires you to keep track of where all features are activated. You should try to get used to Upgrading, CKS Dev adds an Upgrade action to visual studio. –  Per Jakobsen Jun 13 '12 at 16:59

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.