How to display "When an incident has a knowledge article attached the Knowledge articles "Incident" tab should reflect/populate the incident # that was attached to said article.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 02:48 AM
When an incident has a knowledge article attached the Knowledge articles "Incident" tab should reflect/populate the incident # that was attached to said article.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2020 10:36 PM
Hi,
okay any field on incident you could find which stores knowledge; please check xml of the knowledge record
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2020 11:08 PM
I have searched both Incident and Knowledge Article record xml 's and i don't see incident xml is storing knowledge related sys_id and Knowledge Article is storing incident related sys id.
i could see on incident record worknotes only updating as article attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2020 11:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2020 11:52 PM
Hi,
in that case you can use this table to query in the relationship script section
please try this and check once
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
var incArray = [];
var gr = new GlideRecord('m2m_kb_task');
gr.addQuery('kb_knowledge', parent.sys_id);
gr.query();
while(gr.next()){
incArray.push(gr.task.toString());
}
current.addQuery('sys_id', 'IN', incArray.toString());
})(current, parent);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 12:33 AM