I want to retrieve our stored knowledgebase articles regardless of the language they are in. However querying KnowledgeArticleVersion using SOQL requires a language be specified in the where clause or it produces an error. I don't want to have to separately query every possible language that might exist, is there a way to find out what translations for an article exist?
-
How many languages do you have?– raym0ndCommented Mar 24, 2016 at 17:16
-
At the moment only 3 I believe but that is likely to increase over time– Pete SCommented Mar 24, 2016 at 17:16
-
1You can always put the languages in an OR or in a list and say Languages IN ('.....'). Did you try that?– raym0ndCommented Mar 24, 2016 at 17:19
-
1Always filter on a single value of Language. However, in SOQL, you can filter on more than one Language if there is a filter on Id or KnowledgeArticleId. So if you set the ID's as a list of all ID's then you can filter on more than one language– raym0ndCommented Mar 24, 2016 at 17:24
-
1Oh yes, I missed that you can do it if you filter on KnowledgeArticleId as well as Id. That's perfect thanks. If you want to put that in an answer I'll mark it as accepted.– Pete SCommented Mar 24, 2016 at 17:40
|
Show 1 more comment
1 Answer
As per salesforce documentation on KnowledgeArticleId
It seems that you can filter on more than one language if you set an ID filter, simply add all the ID's then filter on the languages :)
-
Hi @raymond, Could you please share the query that worked for you, I have a similar requirement Commented Jul 25, 2017 at 7:18