KnowledgeArticleVersion

Provides a global view of standard article fields across all article types depending on their version. Use this object to:When you query on the archived article, the results include the article and the article’s archived versions, as well.
Note
You can update only translated draft versions with the API.

Supported Calls

describeLayout(), describeSObjects(), query(), retrieve(), search(), and update().

Note
You can only update draft versions.

Special Access Rules

A user must have the “View Articles” permission enabled. Salesforce Knowledge users, unlike Customer Portal and partner portal users, must also be granted the Knowledge User feature license.

Fields

Field Name Details
ArchivedById
Type
reference
Properties
Filter, Nillable
Description
The ID of the user who archived the article.
ArchivedDate
Type
dateTime
Properties
Filter, Nillable
Description
The date when the article was archived.
ArticleNumber
Type
string
Properties
Autonumber, Defaulted on create, Filter
Description
The unique number automatically assigned to the article when it's created. You can't change the format or value for this field.
FirstPublishedDate
Type
dateTime
Properties
Filter, Nillable
Description
The date when the article was first published.
IsMasterLanguage
Type
boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the article has zero or more translations associated with it (true) or not (false). Only accessible if your knowledge base supports multiple languages.
IsOutOfDate
Type
boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the source article has been updated since this translated version was created (true) or not (false). Only accessible if your knowledge base supports multiple languages.
IsVisibleInApp
Type
boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the Articles tab (true) or not (false).
IsVisibleInCsp
Type
boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the Customer Portal (true) or not (false).
IsVisibleInPkb
Type
boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the public knowledge base (true) or not (false).
IsVisibleInPrm
Type
boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the partner portal (true) or not (false).
KnowledgeArticleId
Type
reference
Properties
Filter
Description
The ID of the article independent from its version. The value for this field is retrieved from the Id field of the KnowledgeArticle object.
Language
Type
picklist
Properties
Filter, Restricted picklist
Description
The language that the article is written in, such as French or Chinese (Traditional).

Querying or searching articles in SOQL or SOSL requires that you specify the Language field in the WHERE clause. The language must be the same for all article types.

LastPublishedDate
Type
dateTime
Properties
Filter, Nillable
Description
The date when the article was last published.
MasterVersionId
Type
reference
Properties
Filter, Nillable
Description
ID of the source article, if this is the translation of a source article. Only accessible if your knowledge base supports multiple languages.
OwnerId
Type
reference
Properties
Filter
Description
The ID of the article's owner.
PublishStatus
Type
picklist
Properties
Filter, Restricted picklist
Description
The publication status for the article:
  • Draft: any draft articles.
  • Online: articles published in Salesforce Knowledge.
  • Archived: archived articles.

A user must have the “Manage Articles” permission enabled to use Online.

Querying or searching articles in SOQL or SOSL requires that you specify either the PublishStatus or the Id field in the WHERE clause.

SourceId
Type
reference
Properties
Filter, Nillable
Description
ID of the source from which the article was created (Case or Reply).
Summary
Type
textarea
Properties
Filter, Nillable
Description
Summary of the article. Maximum size is 1000 characters.
Title
Type
string
Properties
Defaulted on create, Filter, idLookup
Description
Required. Article's title. Maximum size is 255 characters.
TranslationCompletedDate
Type
dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last translated. Only accessible if your knowledge base supports multiple languages.
TranslationExportedDate
Type
dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last exported for translation. Only accessible if your knowledge base supports multiple languages.
TranslationImportedDate
Type
dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last imported for translation. Only accessible if your knowledge base supports multiple languages.
UrlName
Type
string
Properties
Filter
Description
Required. Represents the article's URL. Can contain alphanumeric characters and hyphens but can't begin or end with a hyphen. UrlName is Case sensitive and its maximum size is 255 characters.
ValidationStatus
Type
picklist
Properties
Group
Description

Shows whether the content of the article has been validated. Default values are Validated, and Not Validated. This field is available in API version 24.0 or later.

VersionNumber
Type
int
Properties
None
Description
The number assigned to a version of an article. . This field is available in API version 24.0 or later.

Usage

Use this object to query, retrieve, or search for articles across all article types depending on their version. You can update draft master articles. Additionally, you can delete articles that are not drafts. Client applications can use KnowledgeArticleVersion with describeDataCategoryGroups() and describeDataCategoryGroupStructures() to return the category groups and the category structure associated with Salesforce Knowledge.

Alternatively, client applications can use the article type API Name followed by __kav to query, retrieve, or search for articles for a specific article type.

To access an article independent of its version, use the KnowledgeArticle object.

SOQL Samples

The following SOQL clause uses KnowledgeArticleVersion to query all published articles from all article types complying with the classification specified in the WITH DATA CATEGORY clause:
SELECT Title, Summary
FROM KnowledgeArticleVersion
WHERE PublishStatus='Online'
AND Language = 'en_US'
WITH DATA CATEGORY Geography__c ABOVE_OR_BELOW europe__c AND Product__c BELOW All__c
The following SOQL clause uses the article type API Name to limit the query to all draft articles from the Offer__kav article type:
SELECT Id, Title
FROM Offer__kav
WHERE PublishStatus='Draft'
AND Language = 'en_US'
WITH DATA CATEGORY Geography__c AT (france__c,usa__c) AND Product__c ABOVE dsl__c

SOQL and SOSL Limits on KnowledgeArticleVersion

For SOQL and SOSL:

© Copyright 2000–2012 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.