SharePoint 2007: SPFileCollection.Add – Title is not updating

An old ghost that bothered again. We were trying to upload document along with metadata using SPFileCollection.Add Method. The issue we were facing is that “Title” column is not updated.

Our code don’t give us any error and columns other than “Title” were updated.

Hashtable itemMetaData = new
Hashtable();

itemMetaData.Add(“Title”, “New Title”);

itemMetaData.Add(“Second_Column”, “Column_Value”);

SPFile spFile = fileColl.Add(url, content, itemMetaData, true);

 

We looked for internal name as it happened previously but noon. Then, comes Google and Dave Hunter solved the problem.

Resolution:

Add “vti_” before “Title”. So, it must be “vti_title”, instead of “Title”. Reason is that it is acronym from Vermeer Technologies Incorporated, acquired by MS in January, 1996.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: