You need to sign in to do that
Don't have an account?
Hermann Ouré
How to make sub query for Knowledge__kav articles related to Cases
Hello,
I am trying to query Articles on the Knowledge__kav object related to Cases. But I have the following error
Didn't understand relationship 'Knowledge__kavs' in FROM part of query call.
How can I make a subquery on Knowledge__kav?
I am trying to query Articles on the Knowledge__kav object related to Cases. But I have the following error
Didn't understand relationship 'Knowledge__kavs' in FROM part of query call.
How can I make a subquery on Knowledge__kav?
Map<Id, Case> caseMap = new Map<Id, Case>([SELECT Id, First_JIRA_Issue_Number__c, (SELECT Id FROM Knowledge__kavs) FROM Case WHERE Id IN :caseIdJiraIssueId.keyset()]);
Hi Hermann,
You need to mention Knowledge__kavs as Knowledge__kavs__r.
Map<Id, Case> caseMap = new Map<Id, Case>([SELECT Id, First_JIRA_Issue_Number__c, (SELECT Id FROM Knowledge__kavs__r) FROM Case WHERE Id IN :caseIdJiraIssueId.keyset()]);
Please choose best answer if your problem has been resolved.
Regards,
Priya.