(SPListItem, Term, Int32) del método TaxonomyField.SetFieldValue
Sets the value of the corresponding field in the list item to the properties of the specified Term in the specified language.
Espacio de nombres: Microsoft.SharePoint.Taxonomy
Ensamblado: Microsoft.SharePoint.Taxonomy (en Microsoft.SharePoint.Taxonomy.dll)
Sintaxis
'Declaración
Public Sub SetFieldValue ( _
item As SPListItem, _
term As Term, _
lcid As Integer _
)
'Uso
Dim instance As TaxonomyField
Dim item As SPListItem
Dim term As Term
Dim lcid As Integer
instance.SetFieldValue(item, term, lcid)
public void SetFieldValue(
SPListItem item,
Term term,
int lcid
)
Parámetros
item
Tipo: Microsoft.SharePoint.SPListItemThe SPListItem object whose field is to be updated.
term
Tipo: Microsoft.SharePoint.Taxonomy.TermThe Term object whose properties are used to update the field value.
lcid
Tipo: System.Int32The language code identifier (LCID) of the language of the default Label to use.
Excepciones
Excepción | Condición |
---|---|
ArgumentException | One or more arguments to this method are una referencia null (Nothing en Visual Basic). |
Comentarios
A Term has a maximum of one default Label for every new language in the TermStore object. The default Label used by this method is The default Label of the Term in the language specified by the lcid parameter, if one exists, otherwise the default language of the TermStore is used.
If the AllowMultipleValues property is true, the field will be assigned a TaxonomyFieldValueCollection object. Otherwise, it will be assigned a TaxonomyFieldValue object.