Show only latest published knowledge article version in the related articles list of knowledge article.

Patiha
Kilo Contributor

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.

7 REPLIES 7

Community Alums
Not applicable

Hi @Harshi ,

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:

 

find_real_file.png

 

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

Hi @Sandeep Dutta ,

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. 

Aman Kumar S
Kilo Patron

Refer to below article by @shloke04 

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 🙂

 

Best Regards
Aman Kumar

Hi @shloke04 ,

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.