Источник:
http://blogs.msdn.com/crm/archive/20...s-crm-4-0.aspx
==============
Don’t miss the new information that we just published in the
Microsoft Dynamics CRM 4.0 Update! In addition to new Visual Studio projects and new samples, you can get information about attributes that are specific to Microsoft Dynamics CRM Online. Here’s a sample, which covers the states of the knowledge base article, of what’s new in this update:
States of the Knowledge Base Article
A knowledge base article can be in one of the following states:
- Draft
- Unapproved
- Published
When you create a new knowledge base article, it is saved in Microsoft Dynamics CRM as a draft. To review and edit an article, you have to change the state of the article from Draft to Unapproved. After the review is finished and the article is approved for publishing, change the state of the article from Unapproved to Published. You have to publish an article before you can view it and search for it in Microsoft Dynamics CRM.
To find knowledge base articles in the Microsoft Dynamics CRM Web application, in the Navigation pane, click
Service, and then click
Knowledge Base. The
Articles Queues tab displays three queues: Draft, Unapproved, and Published. The
Draft queue contains newly created knowledge base articles, the
Unapproved queue contains the articles that are being reviewed, and the
Published queue contains the published articles.
To change the state of the knowledge base article, use the
SetStateKbArticle message. The states of the article are specified in the
KbArticleState enumeration.
To publish a knowledge base article, you have to change the state from Draft to Unapproved and then to Published. To delete a knowledge base article, you have to set the state to Draft or Unapproved. You cannot delete an article, if it is in the Published state.
Example
The following examples show how to change the state of the knowledge base article to Draft state.
[C#] SetStateKbArticleRequest request = new SetStateKbArticleRequest(); request.EntityId = articleID; request.KbArticleState = KbArticleState.Draft; request.KbArticleStatus = 1; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }
Example
The following examples show how to change the state of the knowledge base article to Unapproved state.
[C#] SetStateKbArticleRequest request = new SetStateKbArticleRequest(); request.EntityId = articleID; request.KbArticleState = KbArticleState.Unapproved; request.KbArticleStatus = 2; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }
Example
The following examples show how to change the state of the knowledge base article to Published state.
[C#] SetStateKbArticleRequest request = new SetStateKbArticleRequest(); request.EntityId = articleID; request.KbArticleState = KbArticleState.Published; request.KbArticleStatus = 3; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } You can find this information and more about knowledge base articles in the latest release of Microsoft Dynamics CRM 4.0. If you want some step-by-step instructions, check out this article first:
Microsoft Dynamics CRM 3.0 SDK: Creating and Publishing Knowledge Base Articles. Then, see this topic in the update for more information about knowledge base articles in CRM 4.0:
Knowledge Base Entities.
You can download the
Microsoft Dynamics CRM 4.0 Software Development Kit (SDK) from the MSDN Developer Center.
Cheers,
Inna Agranov
Источник:
http://blogs.msdn.com/crm/archive/20...s-crm-4-0.aspx