Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaxonomyField.SetFieldValue method (SPListItem, TermCollection, Int32)

Sets the value of the corresponding multi-value field in the list item to the properties of the Term objects in the specified collection, in the specified language.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

public void SetFieldValue(
	SPListItem item,
	TermCollection terms,
	int lcid


Type: Microsoft.SharePoint.SPListItem

The SPListItem object whose field is to be updated.

Type: Microsoft.SharePoint.Taxonomy.TermCollection

The collection of Term object whose properties are to be used to update the field value.

Type: System.Int32

The language code identifier (LCID) of the language of the default Label objects to use.


One or more arguments to this method are a null reference (Nothing in Visual Basic), or the TaxonomyField object does not allow multiple values.

Each Term has a maximum of one default Label for every language in the TermStore object. For each Term, The default Label in the default language of the TermStore is used.

The field will be assigned a TaxonomyFieldValueCollection object.

© 2015 Microsoft