TermStore.GetTerms method (Guid[])

Gets a collection of Term objects based on the ID of the Term.

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

Syntax

'Declaration
Public Function GetTerms ( _
    termIds As Guid() _
) As TermCollection
'Usage
Dim instance As TermStore
Dim termIds As Guid()
Dim returnValue As TermCollection

returnValue = instance.GetTerms(termIds)
public TermCollection GetTerms(
    Guid[] termIds
)

Parameters

  • termIds
    Type: []

    The IDs of the Term objects to be retrieved

Return value

Type: Microsoft.SharePoint.Taxonomy.TermCollection
A collection of Term objects that are based on the ID of the Term, or an empty collection or a null reference (Nothing in Visual Basic) if no terms match.

Exceptions

Exception Condition
ArgumentNullException

The termIds parameter cannot be a null reference (Nothing in Visual Basic).

Remarks

If a Term is a member of multiple TermSet objects, it arbitrarily returns the Term from one of the TermSet objects. If an ID from termIds cannot be matched against the ID of a term in this TermStore object or if the user does not have sufficient permissions to access it, the term will not be included in the result collection that is returned. This method searches for the Term across all of the child groups and term sets that the user has permissions to read.

If the termIds list contains duplicate IDs, the returned item collection also contains duplicates. If this search finds no terms, then either a null reference (Nothing in Visual Basic) or an empty collection will be returned.

See also

Reference

TermStore class

TermStore members

GetTerms overload

Microsoft.SharePoint.Taxonomy namespace

Id

GetTerm(Guid)

GetTerms(String, Boolean)

GetTerms(String, Boolean, StringMatchOption, Int32, Boolean)

GetTerms(String, Int32, Boolean)

GetTerms(String, Int32, Boolean, StringMatchOption, Int32, Boolean, Boolean, Boolean)