(SPListItem, TermCollection) del método TaxonomyField.SetFieldValue
Sets the value of the corresponding multi-value field in the list item to the properties of the Term objects in the specified collection.
Espacio de nombres: Microsoft.SharePoint.Taxonomy
Ensamblado: Microsoft.SharePoint.Taxonomy (en Microsoft.SharePoint.Taxonomy.dll)
Sintaxis
'Declaración
Public Sub SetFieldValue ( _
item As SPListItem, _
terms As TermCollection _
)
'Uso
Dim instance As TaxonomyField
Dim item As SPListItem
Dim terms As TermCollection
instance.SetFieldValue(item, terms)
public void SetFieldValue(
SPListItem item,
TermCollection terms
)
Parámetros
item
Tipo: Microsoft.SharePoint.SPListItemThe SPListItem object whose field is to be updated.
terms
Tipo: Microsoft.SharePoint.Taxonomy.TermCollectionThe collection of Term objects whose properties are to be used to update the field value.
Excepciones
Excepción | Condición |
---|---|
ArgumentException | One or more arguments to this method are una referencia null (Nothing en Visual Basic), or the TaxonomyField object does not allow multiple values. |
Comentarios
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.