3.1.5.23.2.2.13 GetTermSetsWithCustomProperty
Return Type: Microsoft.SharePoint.Client.Taxonomy.TermSetCollection
Gets a collection of all of the TermSet (section 3.1.5.20) objects in this TermStore (section 3.1.5.23) that the current user has permissions to read, that have a custom property matching the criteria provided.
Remarks:
The CustomPropertyMatchInformation (section 3.1.5.29) values that are set MUST be one of these combinations:
CustomPropertyMatchInformation.CustomPropertyName.
CustomPropertyMatchInformation.CustomPropertyName and CustomPropertyMatchInformation.CustomPropertyValue.
CustomPropertyMatchInformation.CustomPropertyName, CustomPropertyMatchInformation.CustomPropertyValue, and CustomPropertyMatchInformation.StringMatchOption.
CustomPropertyMatchInformation.CustomPropertyName, CustomPropertyMatchInformation.CustomPropertyValue, CustomPropertyMatchInformation.StringMatchOption, and CustomPropertyMatchInformation.ResultCollectionSize.
If the combination of CustomPropertyMatchInformation values is invalid, an ArgumentException or ArgumentNullException will be thrown indicating the invalid setting.
The CustomPropertyMatchInformation.CustomPropertyName (section 3.1.5.29.1.1.1) MUST NOT be set to null or empty, and MUST NOT exceed 255 characters in length. It also MUST NOT contain any of the following illegal characters: ; " < > | & tab
The CustomPropertyMatchInformation.CustomPropertyValue (section 3.1.5.29.1.1.2) MUST NOT be set to null or empty, and MUST NOT exceed 255 characters in length. It also MUST NOT contain the illegal characters \t or \n.
The search is case-insensitive, and will match either the entire value or the custom property name or value, or only check that it starts with the specified string depending on the value of the CustomPropertyMatchInformation.StringMatchOption (section 3.1.5.29.1.1.4) parameter. If the CustomPropertyMatchInformation.StringMatchOption is not set, it defaults to exact match.
The CustomPropertyMatchInformation.ResultCollectionSize (section 3.1.5.29.1.1.3) value MUST be greater than 0. The maximum number of results returned from this search is restricted by the CustomPropertyMatchInformation.ResultCollectionSize parameter. If CustomPropertyMatchInformation.ResultCollectionSize is not set, then a maximum of 100 results is returned.
To get the most accurate results, it is recommended that any pending changes be committed to the database using CommitAll (section 3.1.5.23.2.1.1) prior to executing this search.
Exceptions:
Error Code |
Error Type Name |
Condition |
---|---|---|
-2147024809 |
ArgumentException |
Incorrect combination of CustomPropertyMatchInformation settings provided. |
-2147024809 |
ArgumentException |
The value of CustomPropertyMatchInformation.CustomPropertyName is invalid. It either contains invalid characters or is too long. |
-2147024809 |
ArgumentException |
The value of CustomPropertyMatchInformation.CustomPropertyValue is invalid. It exceeds the maximum allowed length of 255. |
-2147024809 |
ArgumentException |
The value of CustomPropertyMatchInformation.CustomPropertyValue is invalid. It contains invalid character '\t', '\n', or both. |
-2147024809 |
ArgumentException |
CustomPropertyMatchInformation.TrimUnavailable MUST NOT be set. |
-2147467261 |
ArgumentNullException |
Some CustomPropertyMatchInformation settings MUST NOT be null or empty. |
-2147467261 |
ArgumentNullException |
The CustomPropertyMatchInformation.CustomPropertyName MUST NOT be null or empty. |
-2147467261 |
ArgumentNullException |
The CustomPropertyMatchInformation.CustomPropertyValue MUST NOT be null or empty. |
-2146233086 |
ArgumentOutOfRangeException |
The CustomPropertyMatchInformation.ResultCollectionSize is invalid. It MUST be greater than 0. |
Parameters:
customPropertyMatchInformation: Indicates the search criteria to use when retrieving TermSet objects.
Type: Microsoft.SharePoint.Client.Taxonomy.CustomPropertyMatchInformation