Export (0) Print
Expand All

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)

public static int[] GetWssIdsOfTerm(
	SPSite site,
	Guid termStoreId,
	Guid termSetId,
	Guid termId,
	bool includeDescendants,
	int limit
)

Parameters

site
Type: Microsoft.SharePoint.SPSite

The SPSite object that contains the taxonomy hidden list.

termStoreId
Type: System.Guid

A Guid object that uniquely identifies the TermStore object.

termSetId
Type: System.Guid

A Guid object that uniquely identifies the TermSet object.

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.

ExceptionCondition
ArgumentException

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

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.

Show:
© 2014 Microsoft