Print this page

Topics Widget VF component for Knowledge Article Versions

Knowledge Article Number 000213650
Description As per the Developer Documentation:
http://www.salesforce.com/docs/developer/pages/Content/pages_compref_topics_widget.htm

<topics:widget> UI component that displays topics assigned to a record and allows users to add and remove topics. The UI component are available only if topics are enabled for the object.

 

 
 
Resolution Topics are different when it comes to Knowledge. Knowledge article entity itself doesn't have topics, Article Versions will have Topics. 
For example, we have a article- id: kA0C0000000PUkF 
version ids are : ka0C0000000PZJS and ka0C0000000PZCC. 

Topics are associated with each article version. So topic widget takes article version id and not article id. Hence if we modify the above apex page to <topics:widget entity="ka0C0000000PZJS" rendered="true" />, it should work. Similarly for other version id. 

An article can have only version, so topics are enabled for these Versions. To get the Version Id, you can use the below query in Dev console or Workbench.
Or you can create a report on Knowledge Article Versions to fetch the details.
SELECT Id,KnowledgeArticleId,Title FROM KnowledgeArticleVersion WHERE PublishStatus = 'Online' AND Language = 'en_US' 

Note:
We cannot query "KnowledgeArticleVersion" object without filters. Language need not be only en_US.
A
custom report of Knowledge articles With Knowledge Article Versions can also be used to get version Id.
Limiting the Language to en_US might not catch all of the topics associated to a non en_US language article. 

Read more here: KnowledgeArticleVersion




promote demote