GlideRecord - applyTemplate(String template)

Apply a template record (from sys_template) to the current record. If the specified template is not found, no action is taken.

Table 1. Parameters
Name Type Description
template String Name of a template from the sys_template table
Table 2. Returns
Type Description

Scoped equivalent

To replicate this functionality in a scoped application, parse the encodedQuery created by the template, then loop through the terms setting values on the GlideRecord.

var rec1 = new GlideRecord("incident");
//...possibly more code here...