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
guisimguisim 

KnowledgeArticle and KnowledgeArticleVersion relationship

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.

ShamilShamil

Looks like your observations are correct: it doesn't seem possible to get any field of the KnowledgeArticle from KnowledgeArticleVersion. You'll need 2 SOQLs