- 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
‎07-20-2016 07:02 AM
HI, Thanks for your help. Iam just giving you the whole scenario here:
Our business rule is to abort the action whenever the user is trying to submit ticket without populating the mandatory fields. So condition would be: when certain fields are empty.
Action: "Abort action"
What I need:
When ESS users click on "Create Incident" in Knowledge article, it takes to the Incident submission form.
And since there are few more fields mandatory , it says invalid insert when user tries to submit the ticket:
Also I would like to know where it is setting the Caller field automatically.
So the mandatory fields should be populated as soon as the ess user clicks on "Create Incident" button [in Knowledge article form.]
I hope now its pretty clear for you to provide me the solution.
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 07:34 AM
Also I would like to know how to query ""Create Incident" button is used.in knowledge article
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 05:55 AM
Perhaps I'm still missing something, but if you're getting the invalid insert because there are still mandatory fields, why not populate the given fields with the "Create Incident" button functionality?
For example, lets take your short description field. It is mandatory on the incident form. If you want to populate it with a unique value depending on the knowledge article used, do the following:
- Add a custom field to the kb_knowledge form. Lets call it "u_inc_short_description".
- Navigate to sys_properties.list, and open the property: glide.knowman.create_incident_link
- Replace the property's existing value field with this:
incident.do?sys_id=-1&sysparm_query=active=true^short_description=$[HTML:knowledgeRecord.u_inc_short_description]^comments=(Created after Knowledge search: $[HTML:knowledgeRecord.short_description])&sysparm_stack=knowledge_home_launcher.do
Now if you edit a knowledge article and enter your desired auto-populating short description, in the "u_inc_short_description" field you created in step 1. Then preview the article, and click "Create Incident". The new Incident's short description will be that same text.
To make it track-able, you could add a "created from" reference field on the Incident form. Have it reference the kb_knowledge table. Then in the glide.knowman.create_incident_link property, you could add some code to make the knowledge article number populate in the reference field. Something like: ^u_created_from=$[HTML:knowledgeRecord.number]
Also, FYI. The "Caller" field OOTB populates with the currently logged in user. This is done by having a scripted default value in the dictionary entry for that field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2016 01:18 AM
Hi,
Thanks for the detailed explanation on this..... If I just want to stop this UI action, What action needs to be taken?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2016 05:33 AM
mark the system property glide.knowman.create_incident_link.display to false.
- Simon
Please mark as helpful if this helps.