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)

Syntax

'Declaration
Public Sub SetFieldValue ( _
    item As SPListItem, _
    term As Term _
)
'Usage
Dim instance As TaxonomyField
Dim item As SPListItem
Dim term As Term

instance.SetFieldValue(item, term)
public void SetFieldValue(
    SPListItem item,
    Term term
)

Parameters

Exceptions

Exception Condition
ArgumentException

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

Remarks

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

See also

Reference

TaxonomyField class

TaxonomyField members

SetFieldValue overload

Microsoft.SharePoint.Taxonomy namespace

GetFieldValue

TaxonomyFieldValue

Term

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint