I am trying to create a VF page to pull all knowledge articles with few custom fields. We have 10 article types in our org. As per salesforce documentation I need to query on each article type object to get knowledge articles of that particular article type as :
SELECT Id, KnowledgeArticleId, Title, PublishStatus, Isdeleted
FROM Help_Center__kav WHERE
language = 'en_US'
AND publishStatus = 'Online'
So if I have 10 article types (or more) do we need to make 10 SOQL Queries? If one more article type is added, I will have to change my apex logic.
Could anyone suggest a better approach?
Is there a way I can query related fields of article types when querying Knowledge article version object?