• guisim
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Hi !

 

I'm trying to query a KnowledgeArticleVersion record and its associated KnowledgeArticle in a single SOQL query.

 

However, reading the objects description, it seems that the KnowledgeArticleVersion's KnowledgeArticleId reference field does not have a RelationshipName.

That means that I cannot do

 

select KnowledgeArticle.CaseAssociateCount from KnowledgeArticleVersion where id='something'

I cannot do that because "KnowledgeArticle" is not a valid relationship on a KnowledgeArticleVersion.

 

Is there a reason for this ? Is there a workaround ?

 

Thanks.

Hi !

 

I want to download the binary body of all the attachments in my organization. I'd like to do so with the least amount of API calls.

It is my understanding that the SOAP API returns a single body (in base64) for each "page" of result (aka you need to use "queryMore" once for every attachment)

 

The problem with this approach is that it costs one API call for each attachment. For other objects where there is no base64 field, you can easily retrieve 1000 items within a single page.

 

The REST API is similar. You can get multiple attachments within a single response but the response does not contain the body itself. It contains an URL to get the body.. so you end up having to do one extra call anyway.

 

Is there a way to get multiple body within a single response ?

 

What is the most "API call" efficient way to get all the attachment bodies ?

 

Thanks !

  • April 05, 2012
  • Like
  • 0