KB Article Versions and how to force open latest published version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2018 07:08 PM
In our Service Offerings we have fields that contain links to KB articles.
Since upgrading to Kingston from Istanbul and turning on versioning in knowledge, we now have an issue where if a new version of an article is created, the fields will still show previous the version/s.
Sure, when someone opens the article it prompts sayings a new version is available, however this is not an ideal UX.
Any ideas on how to either force when opened to go to the latest version, or somehow programmaticly dynamically update the field to only show the latest version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 03:17 AM - edited 02-02-2024 07:00 AM
I do totally agree with this. We have the same issues - we need to publish links to KB articles in our intranet. After updateing the KB article that link is no longer valid. Which is an issue since you have to ensure the manual update at every occurence. IMHO the idea of a fixed URL for KB article is the right one and I fully support. -> Use of the permalink option solves this issue. It creates a URL based on the KB article ID instead of the internal article ID of Servicenow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2018 06:06 AM
Logic to fetch the Sys_id of the latest version of the KB Article if the current ones is not published.
Change the logic as per your requirement
var kb = new GlideRecord('kb_knowledge');
kb.addQuery('sys_id','542d9ff2db8c6f0004edb1c0ef961997');
kb.query();
if(kb.next()) {
if(kb.workflow_state == 'published') {
gs.print('Published KB sysid: '+ kb.sys_id);
}
else if(kb.workflow_state == 'outdated') {
num = kb.number;
gs.print('num' +num);
var kbn = new GlideRecord("kb_knowledge");
kbn.addQuery('number',num);
kbn.query();
while(kbn.next()) {
if(kbn.workflow_state == 'published')
gs.print('Published KB sysid: '+ kbn.sys_id);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 04:47 AM
Where should I add this code in order if old article is opened ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 12:50 PM
Hi,
Create content item and give content type as external content then it will ask you to enter URL provide the knowledge article URL. It will directly points to the latest version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2022 12:28 AM
I want to do this in the related articles. If a old version related article is added and some one opens it then it should automatically take the user to the latest one. Possible?