+ Start a Discussion
siva shakthisiva shakthi 

how to query a knowledge article using multiple language filter ?

i want query knolwedge article using multiple language filter 
SELECT Id, title, UrlName, LastPublishedDate,LastModifiedById,Language FROM KnowledgeArticleVersion WHERE PublishStatus = 'online' And Language='en_US' AND Language='fr'
But getting this error :
Implementation restriction: When querying the KnowledgeArticleVersion object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or Language = [language ISO code]. In addition Language is only permitted in a top-level AND condition.
Khan AnasKhan Anas (Salesforce Developers) 

Hi Siva,

Greetings to you!

You cannot query by many languages, unfortunately. According to Salesforce doc (https://developer.salesforce.com/docs/atlas.en-us.202.0.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm):

Always 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.

There's an idea which is active on the success community with a similar discussion for which you can upvote so that it gets available in the future.


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas