Show only latest published knowledge article version in the related articles list of knowledge article.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 11:36 PM
Hi Community,
I have a requirement where we need to show only latest published version in the Related Articles related list in knowledge article. Currently we can see all the previous versions in related articles section. Could someone help on this.
Thanks.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 11:55 PM
Hi
This is controlled via Script Include named "KBViewModelSNC" where the function called "findLatestVersion" is used to display the knowledge versions. This functions then again calls another Script include named "KBVersioningSNC" where the function getLatestAccessibleVersion is called where there is no condition mentioned to display only published articles. see the screenshot below:
In order to change this behavior you need to modify the script include named "KBVersioning" to override the KBVersioningSNC script include behavior and to display only published articles.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 01:05 AM
Hi
Appreciate the response. But my requirement here is...lets say there are 3 versions in related list which are related articles, in that case all 3 are published articles and I want to display only the latest article which is published and not show other 2 articles.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 11:56 PM
Refer to below article by
Show latest published version of the article in KB View page
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2022 11:38 PM
Hi
Could you please help me with the script what need to be added in the ''KbVersioning'' include to display only published articles in related list.