Adding knowledge to Incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 09:30 AM
Hi, bit of a two part question.
Firstly, is it possible when a knowledge article is attached to an incident to automatically populate the KB Article field within the related records tab?
Secondly, I don't fully understand the difference between attaching a KB and adding the KB reference with the KB article on related records.
If I'm trying to trend on the use of knowledge, I can see that by looking at related records, much in the way we'd look at linking to problem or MI, but the benefit of attaching the knowledge to an incident escapes me.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 12:43 PM
Hello,
Usually, by clicking on "Attach" button from the Related Search Results section > the KB Article is added to Additional comments as an hyperlink in Incident form, once saved the link will be available in Notes section.
In case the KB Article field on Incident is a custom defined (guess its not available by default), then you may write a Business Rule on Incident table by Glide Recording the KB. Yes, it is possible for this case.
Secondly, the difference would be like said above Attach KB is added via Additional Comments and the KB Article field maybe a custom created field in Related Records tab for you.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 01:25 PM
Hi, thanks Akash4
So at the moment, I need to encourage more KB creation and to link incidents to KBs when the incident is to be resolved. It seems people at my place of work, mostly don't link anything, and those that do, they either attach the KB, even if it's not a public facing KB even though it's not something the end user will be able to run through and resolve themselves, or add to the related records field. I have a report now which shows which KBs are linked to each incident, however as I'm still fairly new to Service Now, and can't yet say the report is 100% accurate, I want to ensure i'm capturing incidents both where KB is attached and KB is related, if it's only showing KB related, I was hoping it may be possible that once a KB is attached it also populates the related records as well as a worknote. If this makes sense...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 01:57 PM
Speaking about the process, yes the last statement makes sense. But sometimes the attached KB Article can be misleading and a new KB can be attached as a hyperlink in Notes section or attached 2 complimentary KBs which is not possible in 1 field.
Yet, if we focus on the goal - "Create more relevant KB Articles, Assess access of public/snc_internal role based KBs that helps users":
1. Maybe the Report should be only based on field under Related Records (since reporting on work notes or journals is not so easy) - yes like mentioned this is not a complete view.
2. To achieve the other half, you can configure a Business Rule (async) where once the KB related notes are found either in Worknotes or Additional comments then the system automatically populates the field say "KB Article" (but if already a value exists, then we can skip)
Here is a sample code:
(function executeRule(current, previous /*null when async*/) {
var kbRegex = /KB\d+/; // Regular expression format 'KB' followed by digits
var commentsOrWorknotes = current.comments.getJournalEntry(1) || current.work_notes.getJournalEntry(1);
if (commentsOrWorknotes) {
var kbMatch = commentsOrWorknotes.match(kbRegex);
if (kbMatch && kbMatch.length > 0) {
var kbNumber = kbMatch[0]; // Extract KB number like 'KB0000123'
var kb= new GlideRecord('kb_knowledge');
if (kb.get('number', kbNumber)) {
current.u_kb_article = kb.sys_id;
}
}
}
})(current, previous);
But the challenge here is, it works only for future records but not for the past. I understand this can be of help in the later stages but not immediately yet you can give it a start to define a system specific process for handling this issue.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.