Udostępnij za pośrednictwem


FullTextSearchKnowledgeArticleRequest.StateCode Property

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Gets or sets the state of the knowledge articles to filter the search results. Required.

Namespace:   Microsoft.Crm.Sdk.Messages
Assembly:  Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)

Syntax

public int StateCode { get; set; }
Public Property StateCode As Integer

Property Value

Type: System.Int32

Types: Int32
The state code of the knowledge articles to be searched.

Remarks

Use this parameter to restrict the knowledge article search by state. If you do not want to filter on any state value, specify a negative value for this parameter, say -1.

You can use the following state code values to filter your results:

  • 0: Draft

  • 1: Approved

  • 2: Scheduled

  • 3: Published

  • 4: Expired

  • 5: Archived

  • 6: Discarded

Notes for the caller

Some of the filtering is done post-search from the full-text index, which depends on the values specified for the StateCode and RemoveDuplicates parameters. The rules based on StateCode and RemoveDuplicate parameters are:

StateCode

RemoveDuplicates

Search result

0, 1, 2, 3, 4, 5, or 6

True

First 250 articles that match the search text are returned. Multiple versions of the same article in the specified state are removed. Only the latest version in that state is returned.

0, 1, 2, 3, 4, 5, or 6

False

Search results are filtered by the specified state. If matched, there can be multiple versions of the same article in search results.

Negative value

True

The results are not filtered by any state, and the latest articles are returned.

Negative value

False

All matched results are returned. No additional filtering is done.

See Also

FullTextSearchKnowledgeArticleRequest Class
Microsoft.Crm.Sdk.Messages Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright