Newer Version Available

This content describes an older version of this product. View Latest

Salesforce Knowledge with SOQL and SOSL

Use the Salesforce Object Query Language (SOQL) to search your organization’s Knowledge data for specific information. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce. Use the Salesforce Object Search Language (SOSL) to construct text-based search queries against the search index.
Knowledge Object Limits
KnowledgeArticleVersion
  • Always filter on a single value of PublishStatus unless the query filters on one or more primary key IDs. To support security, only users with the “Manage Articles” permission see articles whose PublishStatus value is Draft.
  • Archived article versions are stored in the articletype_kav object. To query archived article versions, specify the article Id and set IsLatestVersion='0'.
  • 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.

For generic SOQL and SOSL information see the Force.com SOQL and SOSL Reference.