How to display only published articles in ecportal servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi
Right now, in our portal all the Knowledge articles are displaying , but we need to restrict that to only published articles should be displayed and retired/oudated articles should not displayed
what is the configuration we need to do for this? Please help for this issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @sri vijaya
Refer KB: KB0778944 Outdated version of the article is still visible to the end users
Cause
On the ServiceNow platform, the old versions of the KB articles are NOT blocked from viewing for the end-users if they have the DIRECT URL of the Old version of the KB article
But whenever they search for the KB articles [Global Search, Self Service Search, KB Portal search] only the latest version of the KB article is displayed.
Customization for expected feature:
- Open the widget displaying the articles
- Review the Server Script.
- Ensure the GlideRecord query explicitly filters out retired states. Use any of the code snippet.
gr.addQuery('workflow_state', 'published');
Or
add gr.addQuery('workflow_state', 'NOT IN', 'retired');)
Refer:
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti