Share via


TermStore.GetTerm Method (Guid)

Gets a Term based on its ID.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.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.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

GetTerm Overload

Microsoft.SharePoint.Taxonomy Namespace

Id

GetTerm(Guid, Guid)