Carry the KB NUMBER to a new INC instead of the Description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 09:52 AM - edited 06-14-2024 10:02 AM
By default, the Create Incident link carries the KB description over to the new INC. That is...stupid. The article name changes but the Number is always the same so I would like the article's NUMBER to carry over instead. I have no idea how to make that reference.
work_notes=(Created after viewing $[encodedKb_desc])&sysparm_stack=knowledge_home_launcher.do
I would like that to be the KB number. Someone online said that using "$[HTML:knowledgeRecord.number]" would work but it just ends up in the field just like that. I saw that encodedKb_desc is defined in the kb_view UI page, but I don't know how to add one for the number instead or if that's even what I need to do.
var kb_name = knowledgeRecord.kb_knowledge_base.getDisplayValue();
var kb_desc = knowledgeRecord.short_description.getDisplayValue();
var encodedKb_desc = encodeURIComponent(kb_desc);
var kb_title = GlideStringUtil.escapeHTML(kb_name + " - " + kb_desc);
I tried to do a few things that didn't work. I'm sure it's my lack of dev experience in my way. I also noticed that there's a kb-article-content.js that says:
c.createIncidentURL = c.createIncidentURL.replace("$[encodedKb_desc]", encodeURIComponent(c.data.shortDesc));
I have no idea how to find or modify this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 11:58 AM
I think you are on the right track. What are the exact steps to reproduce the issue? Is it in the Core UI or in a service portal? And if in a portal – which one? /sp? /esc?
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/