2

I need to query all the linked articles of a case, so I just try to use this kind of query in the query editor of the developer console :

select Id from LinkedArticle where LinkedEntityId = 'the id of my case here'

But it throws me an error saying :

select Id from LinkedArticle where LinkedEntityId = '5009E000005yCEIQA2' ^ ERROR at Row:1:Column:36 No such column 'LinkedEntityId' on entity 'LinkedArticle'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

But here I can see that the field exist... But I checked the workbench and for the linkedArticle object there is no LinkedEntityId field !

So how can I specify the id of the case ? I don't want to retrieve all the linkedArtcile, just for one case at a time (I will use this query in an apex class).

(I use the api version 42.0)

2

To find the knowledge articles which are linked to a Case, you need to perform query on CaseArticle object as below

SELECT KnowledgeArticleId, ArticleLanguage, ArticleVersionNumber 
FROM CaseArticle 
WHERE CaseId= '5000v000002J6Sj'

caseArticle

For more information, refer CaseArticle

LinkedArticle object represents Knowledge article that is attached to a work order or work order line item.

| improve this answer | |
  • Ok, so when I query the CaseArticle object, then I can retrieve a list of KnowledgeArticleId and query the LinkedArticle that has the same KnowledgeArticleId ! – dou Apr 11 '18 at 14:13
  • 1
    Based on KnowledgeArticleId you need to query respected KnowledgeArticle object – Santanu Boral Apr 11 '18 at 14:15
  • Ok I retrive the KnowledgeArticle associated to the KnowledgeArticleId. Now how can I get the property of the article like the body, etc ? Is the KnowledgeArticle object linked to another object ? – dou Apr 12 '18 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.