You are currently offline, waiting for your internet to reconnect

SharePoint 2010: Values entered in Enterprise Keywords column are not saved for Office 2007 and 2010

Create a site column which has two words and a space between these two words through Object Model code. Associate this site column and "Enterprise Keywords" column to a Site Content type. Associate this Content type to a Document library. Upload a 2007 document to the document library and enter values for the Enterprise Keywords column and click Ok. Edit properties of the document and notice that the Enterprise Keywords value is not saved. Values are stored for txt or Office 2003 file types.
When we create a site column through the Object model and associate the StaticName property of the field with a string which has two words and a space between these two words and set this field as Required you would notice this issue.

While assigning the StaticName property of the field ensure that the string doesn't have any spaces between the words.

For Ex: Issue would occur if we create a Site column as given below

SPSite oSite = new SPSite("<SiteURL>");
SPWeb oWeb = oSite.OpenWeb();
oWeb.AllowUnsafeUpdates = true;
SPFieldText retTypeText = new SPFieldText(oWeb.Fields, SPFieldType.Text.ToString(), "Test Column");
objNewField = retTypeText;
if (objNewField != null)
objNewField.Title = "Test Column";
objNewField.Required = true;
objNewField.ShowInDisplayForm = true;
objNewField.ShowInEditForm = true;
objNewField.ShowInNewForm = true;
objNewField.ShowInViewForms = true;
objNewField.ShowInListSettings = true;
objNewField.StaticName = "Test Column";
oWeb.AllowUnsafeUpdates = false;

To resolve the issue, in above code ensure that the value for ObjNewField.StaticName is set as "TestColumn" instead of "Test Column"

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 2430626 - Last Review: 10/25/2010 13:23:00 - Revision: 4.0

Microsoft SharePoint Foundation 2010, Microsoft SharePoint Server 2010

  • KB2430626