Export (0) Print
Expand All
Expand Minimize

RetrieveByTopIncidentSubjectKbArticle Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment typesWorks online and offline

Retrieves the top ten knowledge base articles for the specified subject.

The relevant classes are specified in the following table.

TypeClass
RequestRetrieveByTopIncidentSubjectKbArticle
ResponseRetrieveByTopIncidentSubjectKbArticle
Entitykbarticle

Remarks

To use this message, pass an instance of the RetrieveByTopIncidentSubjectKbArticle class as the request parameter in the Execute method.

To perform this action, the caller must have access rights on the knowledge base article entity instance. For a list of required privileges, see RetrieveByTopIncidentSubjectKbArticle Privileges.

Example

The following code example shows how to use the RetrieveByTopIncidentSubjectKbArticle message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the request.
RetrieveByTopIncidentSubjectKbArticleRequest byTopSubjectRequest = new RetrieveByTopIncidentSubjectKbArticleRequest();
byTopSubjectRequest.SubjectId = new Guid("183804f8-3c78-4c2d-a53d-f56b49b71820");
byTopSubjectRequest.ReturnDynamicEntities = false;

RetrieveByTopIncidentSubjectKbArticleResponse byTopSubjectResponse = (RetrieveByTopIncidentSubjectKbArticleResponse)service.Execute(byTopSubjectRequest);
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle"
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx"
service.CrmAuthenticationTokenValue = token
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the request.
Dim byTopSubjectRequest As New RetrieveByTopIncidentSubjectKbArticleRequest()
byTopSubjectRequest.SubjectId = New Guid("183804f8-3c78-4c2d-a53d-f56b49b71820")
byTopSubjectRequest.ReturnDynamicEntities = False

Dim byTopSubjectResponse As RetrieveByTopIncidentSubjectKbArticleResponse = CType(service.Execute(byTopSubjectRequest), RetrieveByTopIncidentSubjectKbArticleResponse)

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2015 Microsoft