Article ID: 2430626 - View products that this article applies to.
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>");
To resolve the issue, in above code ensure that the value for ObjNewField.StaticName is set as "TestColumn" instead of "Test Column"
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2430626 - Last Review: October 25, 2010 - Revision: 4.0
Contact us for more help