Apply catalog template to a record during or after creation

Simon9
Tera Contributor

Hey, I want to apply a catalog template to a Software catalog record when it is created. The record will have the sys_id of the template in the "sc_template" field. I have tried different approaches with a before/after business rule using what I found under "Scripted templates" in the docs.

current.applyTemplate("<templatename>");
GlideTemplate.get(template.sys_id).apply(GlideRecord)

 However, the record never got anything from the template. Ex:

var template = GlideTemplate.get(current.sc_template);
template.apply(current);

 

It does not need to be done in a business rule. It was just what I tried

0 REPLIES 0