+ Start a Discussion
sadasiva07sadasiva07 

Publishing of Articles -- problem with KB methods

In summer release salesforce provide api for knowledge :

 

when i using these methods i getting error as "Invalid method or signature doesn't exsists".

 

This is code which im using in systemlog.

 

KnowledgeArticle  s= new KnowledgeArticle ();
s=[select id from KnowledgeArticle where id='kA6V0000000001d'];
system.debug('__________'+KbManagement.Publishinervice.publishArticle(s));

AdrianCCAdrianCC

Hi,

 

Can you please give me the link to the summer release with the knowledge api?

 

The error you are getting might be because of a typo- like KbManagement.Publishinervice.publishArticle(s), where Publishinervice seems to be incorrect . Check the code again and use copy/paste for method names.

 

Also take a look at this link: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_guidelines_knowledge.htm . Shouldn't you be using <Article Type>__ka instead of KnowledgeArticle?

 

Ty,

Adi

francoisLfrancoisL

The right way to publish an article using Summer'12 is as follow:

 

String articleId = 'Insert article ID';
KbManagement.PublishingService.publishArticle(articleId, true);

 

Where articleid is the KnowledgeArticleID