TermStore.GetTerm Method

Definition

Overloads

GetTerm(Guid)

Gets a Term based on its ID.

GetTerm(Guid, Guid)

Gets a Term object that is based on the ID of the TermSet object and the ID of the Term.

GetTerm(Guid)

Gets a Term based on its ID.

public:
 Microsoft::SharePoint::Taxonomy::Term ^ GetTerm(Guid termId);
[Microsoft.SharePoint.Client.ClientCallableMethod(CacheReturnValue=true, ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, ReturnObjectIdentity=true)]
public Microsoft.SharePoint.Taxonomy.Term GetTerm (Guid termId);
member this.GetTerm : Guid -> Microsoft.SharePoint.Taxonomy.Term
Public Function GetTerm (termId As Guid) As Term

Parameters

termId
Guid

The ID of the Term object to be retrieved

Returns

Term

A Term object with a matching ID, or a null reference (Nothing in Visual Basic) if the matching term cannot be found

Attributes
ClientCallableMethodAttribute

Exceptions

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.

Applies to

GetTerm(Guid, Guid)

Gets a Term object that is based on the ID of the TermSet object and the ID of the Term.

public:
 Microsoft::SharePoint::Taxonomy::Term ^ GetTerm(Guid termSetId, Guid termId);
[Microsoft.SharePoint.Client.ClientCallableMethod(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, Name="GetTermInTermSet", ReturnObjectIdentity=true)]
public Microsoft.SharePoint.Taxonomy.Term GetTerm (Guid termSetId, Guid termId);
member this.GetTerm : Guid * Guid -> Microsoft.SharePoint.Taxonomy.Term
Public Function GetTerm (termSetId As Guid, termId As Guid) As Term

Parameters

termSetId
Guid

The Microsoft.SharePoint.Taxonomy.TermSet.Id of the TermSet that the Term is a member of

termId
Guid

The Microsoft.SharePoint.Taxonomy.Term.Id property of the Term to get

Returns

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

Attributes
ClientCallableMethodAttribute

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.

Applies to