I need to add a new column to an existing Content Type in Sharepoint 2010. This column requires a default value. How do I apply the new column to the existing Content Type, and apply the default value to all existing list items that use the Content Type? Thx, Barry
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
You would need to create the site column, and the default value, then you need to touch all existing items in the content type to update them. The code to update items in powershell is here I sourced that for you, I'm not sure if you would have to set it or just update it, if you edit the content type and save it will add the default value, I am not sure about with powershell, but anyway you might as well set it in the script. |
|||
|
|
|
If you don't have many records in your list/doclib (I mean, less than several hundred), then my suggestion is to do this in two steps which could avoid writing code:
done. |
|||
|
|