Export (0) Print
Expand All

TaxonomyField.SetFieldValue method (SPListItem, Term)

Sets the value of the corresponding field in the list item to the properties of the specified Term object in the default language of the TermStore object.

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

public void SetFieldValue(
	SPListItem item,
	Term term
)

Parameters

item
Type: Microsoft.SharePoint.SPListItem

The SPListItem object whose field is to be updated.

term
Type: Microsoft.SharePoint.Taxonomy.Term

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

ExceptionCondition
ArgumentException

One or more arguments of this method are a null reference (Nothing in Visual Basic).

A Term has a maximum of one default Label for every language in the TermStore object. This method uses the same default Label (in the default language of the TermStore object )that the Term object uses by default

Show:
© 2015 Microsoft