TermStore.GetTerm Method (Guid, Guid)
Gets a Term object that is based on the ID of the TermSet object and the ID of the Term.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Function GetTerm ( _
termSetId As Guid, _
termId As Guid _
) As Term
'Usage
Dim instance As TermStore
Dim termSetId As Guid
Dim termId As Guid
Dim returnValue As Term
returnValue = instance.GetTerm(termSetId, _
termId)
public Term GetTerm(
Guid termSetId,
Guid termId
)
Parameters
termSetId
Type: System.GuidThe Id() of the TermSet that the Term is a member of
termId
Type: System.GuidThe Id() property of the Term to get
Return Value
Type: Microsoft.SharePoint.Taxonomy.Term
A Term object with a matching ID and parent TermSet ID, or a null reference (Nothing in Visual Basic) if it cannot be found
Remarks
Returns a null reference (Nothing in Visual Basic) if the Term cannot be found or if the user does not have sufficient permissions to access the Term. This method searches for the Term object across all child groups and term sets that the user has permissions to read.