TermStore.GetTerm method

Gets a Term based on its ID.

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

Syntax

'Declaration
Public Function GetTerm ( _
    termId As Guid _
) As Term
'Usage
Dim instance As TermStore
Dim termId As Guid
Dim returnValue As Term

returnValue = instance.GetTerm(termId)
public Term GetTerm(
    Guid termId
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.Taxonomy.Term
A Term object with a matching ID, or a null reference (Nothing in Visual Basic) if the matching term cannot be found.

Exceptions

Exception Condition
ArgumentNullException

The id value cannot be a Guid.Empty value.

Remarks

If the current Term is a member of more than one TermSet objects, it will arbitrarily return the term from one of the TermSet objects. If the Term cannot be found or if the user does not have sufficient permissions to access it, the method returns null. This method searches for the Term object across all child groups and term sets that the user has permissions to read.

See also

Reference

TermStore class

TermStore members

Microsoft.SharePoint.Client.Taxonomy namespace