ServiceNow Feature – Templates

ServiceNow Feature – Templates

Feature: Templates

ServiceNow has a great time-saving feature called ‘Templates’:

It allow you to hard-code a set of values to be pushed in to target fields in a form at the click of a button (extremely time saving).

Attributes: 

Table: Choose the table that the template should update.

User: The owner of the template, the one that can edit the template.

Group: The Group that can see the template.

Template: All the attributes and the corresponding value to be stamped.

A ‘UI Action’ button can be created to launch the Template pop-up:

UI Action:

Script:

function templatePop(){
//Get the table name
var tbl = g_form.getTableName() + ‘.u_template’;

var tblDisp = ‘sys_display.’ + tbl;

var e = gel(tblDisp);

if (!e.ac) {
new AJAXReferenceCompleter(e, tbl, ‘null’, ‘true’);
}

reflistOpen(tbl, ‘u_template’, ‘sys_template’, ‘null’, ‘false’, ‘true’);
}

Leave a Reply

Your email address will not be published. Required fields are marked *