Partilhar via


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. The default Label used by this method is the default Label of the Term in the default language of the TermStore object.

See Also

Reference

TaxonomyField Class

TaxonomyField Members

SetFieldValue Overload

Microsoft.SharePoint.Taxonomy Namespace

GetFieldValue(String)

TaxonomyFieldValue

Term

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint