Feb/16
2010
SharePoint 2007 site columns have three names.
XML ElementSPSite.SPFieldSPList.SPFieldSite GUIList GUI
Title    
NameInternalNameInternalName*in edit URLin edit URL*
DisplayNameTitleTitleNameName
StaticNameStaticNameStaticName  

I don't know what use the XML element Title is, as it does not appear in the deployed site column or list column.

The list instance InternalName is marked with an asterisk above because it cannot be updated afterward.

Using only the GUI, the StaticName and InternalName are normally created the same as the Name. Thereafter, via the GUI, only the Name of the site and list columns can be edited, and the StaticName and InternalName do not change.

Using a "Field" feature, the InternalName, StaticName, and Name of the site column can all be updated; the key is the GUID. But, the site column must not have been customized (or else it will not receive any updates from the feature XML).


Updated values in the site column can be pushed to the list column via the SPField.Update method, with the caveat that this does not propagate the InternalName.


The list column InternalName is the one used by CAML queries and XSLT references for webparts.

My solution to updating feature-based columns is to use a feature receiver, with code in both the FeatureActivated and FeatureDeactivating methods.
  1. The FeatureActivated method calls SPField.Update on any fields which are in use, to push any changes down to list columns. This call causes the site column to become customized.
  2. The FeatureDeactivating method calls SPField.Delete on all of its site columns. This removes the customized site columns, so that at the next update, they will again be installed from the feature xml.
Feedback awaiting moderation

This post has 2 feedbacks awaiting moderation...

Leave a comment

Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)