[SalesForce] Article Type vs KnowledgeArticle

KnowledgeArticle vs Articletype

What is the difference between KnowledgeArticle and Article Type? As indicated in the picture above they have same fields.

Best Answer

From Articles

The article record is the parent container of all versions of an article, whatever the publishing status (draft, published, archived) and the language. While KnowledgeArticle and KnowledgeArticleVersion represent any article in the Knowledge Base, __ka and __kav are the concrete representation of respectively KnowledgeArticle (“__ka” suffix) and KnowledgeArticleVersion (“__kav” suffix) for a specific article type. For example, Offer__kav gives access to every Offer articles. KnowledgeArticle and __ka give access to an article independent of its version. KnowledgeArticleVersion and __kav enables you to retrieve a specific article version and all its standard (KnowledgeArticleVersion) and custom (__kav) fields.

Article Type__ka

Gives access to an article from a specific article type independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause. For more information, see KnowledgeArticle.

KnowledgeArticle

Gives access to an article independent of its version. This object is read–only and can't be used in a SOQL clause or in a WITH DATA CATEGORY DataCategorySpec SOSL clause.

From Inside Salesforce Knowledge (1): Objects / Data Model

At the API level, that capability of allowing multiple versions of an article at the same time induces a dual object structure. For example for an article type FAQ, you have two objects available in the API, FAQ_ka and FAQ_kav***, the former being mostly just a container, or a stable pointer to the article, when the later represents each version with their content. Those objects, allow access to only FAQ article types and all article types at once.

The word inherit, that is underlined above has its importance. All article types inherit from a common entity that is used for cross article types access. That entity is represented by the (dual) object, KnowledgeArticle and KnowledgeArticleVersion.

To the contrary of what you are doing with __ka" or "__kav" objects, which allows accessing records of one article type, including custom fields, KnowledgeArticle and KnowledgeArticleVersion objects allow you to query the entire knowledge base at once, across all article types, but do not give access to custom fields.

See also:

Related Topic