The CreatorCon Call for Content is officially open! Get started here.

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

This was one of my first post on my own blog and here comes an updated version of it. I've thrown out some client scripts etc.and build the functionality in business rules all together instead.

There isn't many things that I miss when we changed our Service Management System to ServiceNow. But there is one thing that especially our ServiceDesk misses and that is being able to choose incident templates on directly on "calls"when you create an incident from a call. Needed to first create the incident and then from the incident click around the "apply template" was unnecessary clicks, waste of energy and time.

So instead I hade it possible that from the call be able to choose which incident template you wanted to apply to the incident.

1. Create a reference field on new_call:

Go to configure Layout and create a reference field on call form named "Incident template". When you create it you can choose any field you want since the template-table isn't in the choice list. This because some tables is system tables are excluded from showing up on the choice list. You can either edit the property: glide.ui.permitted_tables and add the sys_template to be able to choose it directly or do like this.

    1. After you create the field, right click and choose Configure dictionary on the field "incident template".
    2. Change the reference field to the template table (sys_template).
    3. Add the ref qual condition "Table IS incident" to just see incident templates.

incident template 1.GIF

2. Create an UI Policy on new_call:

Now we have a field on call that is named "incident template" and is visible the whole time. So lets hide it unless the call type is "Incident".

    • Set the condition to "Call type IS incident".
    • Make sure the "reverse if false" is checked.
    • Make UI Policy Action on field "u_incident_template" and set "visible to true".

incident template 2.GIF

Now, the last thing to do is to make sure it applies the template when creating the incident.

3. Copy the Business rule "callTypeChanged:

Inactivate the active version of "callTypeChanged". Now make a copy of the business rule and add the following line to apply the template on the incident that is being created.

gr.applyTemplate(current.u_incident_template.getDisplayValue());

Add it at line 25 so it's inside the IF-statement that checks if the call type is an incident:

Don't forget to activate the business rule you now created.

incident template 3.GIF

And that's it. Now if you create a call, choose type incident and select a template the incident shall be created with your specific template.