function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ek0nomikEk0nomik 

Updating article via API results in CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error.

I am trying to update an article type using the API, but anytime I try to update the save result contains an error which reads: "entity type cannot be updated: KBA".  The status code is: "CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY".  Is it not possible to update articles, or is this just a permission issue that I am overlooking?

francoisLfrancoisL

Hi, 

 

With Winter'12, Article version are not updateable. With Spring'12, you will be able to update article version that are in draft state (safe arbor).

 

Thanks, 

Ek0nomikEk0nomik

francoisL,

 

Thank you for the reply.  I haven't worked with articles very much, so just to be clear, the only way to add ratings to articles is through Salesforce.com itself and it isn't possible by using the API?  But, potentially with Spring '12, then if the article is in draft state it will be updateable through the API?

francoisLfrancoisL

If you mean by rating, using the native vote capabilities of salesforce knowledge, you can today by using the Vote object.

Ek0nomikEk0nomik

francoisL,

 

Any chance you can provide a code sample of how to use the Vote object with an article?  I can't find any code samples on how to use that vote object with the API in the documentation.

francoisLfrancoisL

You can use either this VF tag: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_compref_vote.htm?SearchType=Stem

 

or the API Object: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_vote.htm

 

ParentId is KnowledgeArticle Id. 

 

I don't have any example, sorry. 

 

Ek0nomikEk0nomik

I finally have gotten a chance to look at this again.

 

Is it possible to record the vote as another user?  Or does the vote always get logged as the user that authenticated against the API?

francoisLfrancoisL

You guess that you can but you need to contact salesforce support. Here are the details:

http://www.salesforce.com/us/developer/docs/api/Content/system_fields.htm

hamayoun65hamayoun65

Francois

 

We are now upto Winter 13, and I am stiil unable to do this.  I am trying to update a draft artcile using the pilot REST API to update/insert blobs.  The insert works fine, but when I try the update, I get the same error message as in the opening post:

 

[{"fields":[],"message":"entity type cannot be updated: Response Body","errorCode":"CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"}]

 

Please advise if this made it in Spring 12, or if we still cannot update articles.

 

Thx,

Hamayoun

 

francoisLfrancoisL

Hi, 

 

What do you mean by blog? Is it file filed? 

hamayoun65hamayoun65

Francois, by blob I mean as described here:

 

http://www.salesforce.com/us/developer/docs/api_restpre/Content/dome_sobject_insert_update_blob.htm

 

And yes, it's a custom file field Knowledge Article version I am trying to update.  

 

Thx,

Hamayoun

hamayoun65hamayoun65

I should say : it's a custom file field on an Knowledge Article Version obejct I am trying to update.