Attaching KA to an incident - Add message in work notes
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 04:58 AM
Hi
When a Knowledge article is attached to an incidnet, I would like to add a message in the work notes specifically. How do I track that an KA has been added to an incidnet? is there a link table so I can write a business rule on that insert?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 09:30 PM
Hi @gnewuser ,
Try the below business rule, tested and worked fine in PDI
Business rule on table: [m2m_kb_task], after insert
Script:
(function executeRule(current, previous /*null when async*/ ) {
var updateWN = new GlideRecord('incident');
if (updateWN.get(current.task)) {
updateWN.work_notes = 'Attached KA: ' + current.kb_knowledge.getDisplayValue();
updateWN.update();
}
})(current, previous);
Output:
Mark this as Helpful / Accept the Solution if this helps
----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.
Mark this as Helpful / Accept the Solution if this helps.