- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 05:24 PM
Example : var ga= new GlideRecord("change_request");
ga.applyTemplate("Name of template") ;
ga.insert();
I need a way to apply template with sys_id of template rather than template name
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 05:56 PM
It's undocumented, but I have seen this code in Event Managemt business rule where you can apply a template via SysId using the following syntax:
GlideTemplate.get(template.sys_id).apply(GlideRecord)
Set the Sys_ID in the first parameter and the record you want to apply it to in the apply function. This has saved me a headache or two in the recent past.
Please mark helpful or correct if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 05:56 PM
It's undocumented, but I have seen this code in Event Managemt business rule where you can apply a template via SysId using the following syntax:
GlideTemplate.get(template.sys_id).apply(GlideRecord)
Set the Sys_ID in the first parameter and the record you want to apply it to in the apply function. This has saved me a headache or two in the recent past.
Please mark helpful or correct if applicable.