TaxonomyField.GetWssIdsOfTerm method

Gets an array of the list item IDs for all of the list items in the taxonomy hidden list that contain the specified Term object.

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

Syntax

'Declaration
Public Shared Function GetWssIdsOfTerm ( _
    site As SPSite, _
    termStoreId As Guid, _
    termSetId As Guid, _
    termId As Guid, _
    includeDescendants As Boolean, _
    limit As Integer _
) As Integer()
'Usage
Dim site As SPSite
Dim termStoreId As Guid
Dim termSetId As Guid
Dim termId As Guid
Dim includeDescendants As Boolean
Dim limit As Integer
Dim returnValue As Integer()

returnValue = TaxonomyField.GetWssIdsOfTerm(site, _
    termStoreId, termSetId, termId, includeDescendants, _
    limit)
public static int[] GetWssIdsOfTerm(
    SPSite site,
    Guid termStoreId,
    Guid termSetId,
    Guid termId,
    bool includeDescendants,
    int limit
)

Parameters

  • termId
    Type: System.Guid

    A Guid object that uniquely identifies the Term.

  • includeDescendants
    Type: System.Boolean

    A Boolean value that must be set to true if you would like the list item Ids of descendant Term objects to also be included in the results.

  • limit
    Type: System.Int32

    The maximum number of list item IDs to return.

Return value

Type: []
An array of list item IDs of all the list items in the taxonomy hidden list of the specified site that contain the specified Term object.

Exceptions

Exception Condition
ArgumentException

The includeDescendants parameter must be false on keyword searches (i.e. if the TermSetId parameter is Empty).

Remarks

If the TermSetId parameter is set to Empty and theincludeDescendendants parameter is set to false, the method will consider theTerm to be an Enterprise Keyword and only search the corresponding field in the taxonomy hidden list.

If the site parameter is a null reference (Nothing in Visual Basic) or the limit parameter is negative, the method will return an empty array.

See also

Reference

TaxonomyField class

TaxonomyField members

Microsoft.SharePoint.Taxonomy namespace

Microsoft.SharePoint.Taxonomy

Microsoft.SharePoint