Update site columns in existing environment with feature

by Bas Hammendorp 4. March 2010 09:45

So I had this problem with updating site columns in existing site collections. I use a feature with element XML to install my custom site columns in the site collections. The problem is when I try to update some property of an existing site column, for example set required to TRUE, the update cannot be done by reinstalling the changed site column feature. After I reinstalled my updated site columns feature, no changes are comitted in the site columns of my site collection.

I tried ststadm -o deactivatefeature, then stsadm-o installfeature -force, ststadm -o activatefeature with some IISRESET's in between

So what is this hidden solution for this problem? Well the Field nodes in the element file has this strange property DisplaceOnUpgrade, set this to TRUE and the columns will be updated. The explanation from Microsoft:

DisplaceOnUpgrade: Optional Boolean. If a field definition already exists for the field, TRUE to force updates to field properties with the values that are specified in this field definition. Check the link for more info.

Hope this helps you!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Sharepoint

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

My name is Bas Hammendorp, I work as an Enterprise Engineer at PGGM. My specialties are ASP.NET, C#, SQL and Sharepoint 2007.

Google ads