- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 12:37 PM - edited 12-21-2022 12:44 PM
Hello Experts,
I want to create a standard change request from inbound actions and I am using the script below. It does create a change request of standard type but does not apply template. It just creates an empty change request for type 'standard'.
Any help is appreciated!
Thanks,
Ben.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 02:46 PM
Correct line 7 to GlideTemplate.get(<sys id of the template>).apply(current);
Or You can try something like this
var t = new GlideTemplate.get(<sys id of the template>);
t.apply(current);
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 02:37 PM
Hi, the developer portal syntax for applying a template does not seem to match your use,
can you clarify where you sourced the syntax you are using?
GlideRecord | ServiceNow Developers
Based on your partial screenshot, perhaps try something like
current.applyTemplate("yourTemplate");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 02:46 PM
Correct line 7 to GlideTemplate.get(<sys id of the template>).apply(current);
Or You can try something like this
var t = new GlideTemplate.get(<sys id of the template>);
t.apply(current);
Please mark this response as correct or helpful if it assisted you with your question.