- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 09:20 AM
I am attempting to modify the "Create Incident' button from the Knowledge Article view.
My Goal
My knowledge article form is going to have a custom form section that dictates the categorization and template that a given INC record is pre-loaded with when clicking on the 'Create Incident' button.
For example: If there is KB article about troubleshooting Outlook mail configuration. The article's form would have fields that define the Incident categorization (CI = "Outlook), or reference a template.
Need Assistance with Jelly
I've been able to find where the 'Create Incident' button is defined; UI Macro: kb_view_common_header_toolbar. However, I am very unfamiliar with jelly. The button is defined on line 45, but I don't see how to add to or modify it's onClick (or equivalent) function. There are also two other UI Macros that look like they might have something to do with it; kb_view_common and kb_view_hidden_fields.
Any input or assistance would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2016 06:20 AM
I've been able to achieve my goal by modifying a system property, thanks to some feedback from Brad Foolhey.
Before modifying the system property, you must first create custom fields on the KB record form. These fields are what will carry through to the Incident when the "Create Incident" button is clicked for that specific article. For my example, I've created a field on the KB record form called u_inc_ci.
Modify system property glide.knowman.create_incident_link
Basically, the value of this property is the URL that generates and populates the new INC record, so you can just add the field values that you want. use the following format: incident_field_value=$[HTML:knowledgeRecord.knowledge_field_value]
So when modified to include my "u_inc_ci" field to dictate the cmdb_ci field on the incident form, it would look like this:
incident.do?sys_id=-1&sysparm_query=active=true^cmdb_ci=$[HTML:knowledgeRecord.u_inc_ci]^comments=(Created after Knowledge search: $[HTML:knowledgeRecord.short_description])&sysparm_stack=knowledge_home_launcher.do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 09:27 PM
Hi scwillson,
Is there a way this url can be edited to open in a new tab/window?
This is present in system properties and in a string field. When I click on the 'Create Incident' button on kb article. It should open this url in a new tab/window. Is this possible?
I would appreciate any help on this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2017 07:14 AM
It appears that upgrading our instances has turned on the Create Incident button on the Knowledge articles and I have temporarily turned this off on our Live instance because it was using the incident form used by our itil users instead of the customised version we use on the portal for our end users.
On our Dev instance, I have tried to update the glide.knowman.create_incident_link property to use the correct form and populate the short description with the name of the Knowledge article but I can't get it to work. The link that was stored in the property when when I first looked at it was:
incident.do?sys_id=-1&sysparm_query=active=true^comments=(Created after Knowledge search: $[HTML:knowledgeRecord.short_description])&sysparm_stack=knowledge_home_launcher.do
I assumed that "$[HTML:knowledgeRecord.short_description])" would retrieve the Knowledge article title stored in the article's short_description field. The original url was calling the itil incident form but not inserting the Knowledge article short description onto the form and I assumed this was because there isn't a 'comments' field on the itil incident form. So I updated the url to use the customised form and use the 'short_description' field on the form (that is the correct name of the field) to insert the article's short description:
ask_a_question.do?sys_id=-1&sysparm_query=active=true^short_description=(Created after Knowledge search: $[HTML:knowledgeRecord.short_description])&sysparm_stack=knowledge_home_launcher.do
This correctly calls the customised form but does not insert the Knowledge article short description. What am I missing please? Have I misunderstood what the parameters relate to?
Regards,
Anne.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2017 06:14 AM
Hello Anne,
If your custom form's short description is indeed "short_description" and not "u_short_description". Is this perhaps inside a scoped app? (I'm not sure if this would affect it either way, but if it is a scoped app, I would start looking there). Just looking at the code, it looks ok to me, so it seems likely that it is something else in the environment impacting it.
What version are you running?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2017 09:28 PM
Hi Simon.
How can I redirect to previous record rather than creating new record and populate the knowledge values?
I am using below URL
new_call.do?sys_id=-1&sysparm_query=u_fcr=$[HTML:knowledgeRecord.u_fcr]^call_type=$[HTML:knowledgeRecord.u_proces]^u_close_code=$[HTML:knowledgeRecord.u_close_code]^u_close_notes=$[HTML:knowledgeRecord.u_close_notes]^short_description=$[HTML:knowledgeRecord.short_description]^description=(Created after Knowledge search:$[HTML:knowledgeRecord.text])&sysparm_stack=knowledge_home_launcher.do
I want this to redirect to the previous record
Harish