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
JonReevesJonReeves 

KnowledgeArticleVersion RelationshipName?

I'm trying to query all KnowledgeArticleVersions but return back thier Vote and View Stats.

 

Here is the Relational Diag:

http://www.salesforce.com/us/developer/docs/api/Content/images/174/freeze/core/en/xmlsource/dev_guides/api/images/Sforce_knowledge_objects.png

 

However when I Describe the KnowledgeArticle there is no RelationshipName for KnowledgeArticleVersion... any ideas how I can query across these 4 tables?

 

This works to bring back any Article:

SELECT Id, (SELECT NormalizedScore FROM VoteStats WHERE Channel = 'Csp'), (SELECT NormalizedScore FROM ViewStats WHERE Channel = 'Csp') FROM KnowledgeArticle

 But I want to restrict the results with:

SELECT Title FROM KnowledgeArticleVersion WHERE PublishStatus = 'Online' AND Language = 'en_US'

 

 Cheers,

J