- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2019 03:50 AM
Hi All,
I want to set "Template" values to my "incident" field values
Actually "Template" is not a reference field in "sys_template" table it is a type called "Template value"
Please find the below screen shot
Now all i need to set "Impact","urgency","short description" values in to my Incident fields . This actually i am wrting in inbound email action.. How can i achieve this. Kindly please suggest
var gr = new GlideRecord('sys_template');
if (gr.get('c20f98cddbbbab0022f5d404ca9619e2')) {
gs.print(gr.name);
gs.print(gr.table);
gs.print(gr.active);
var templatee = gr.template.toString();
gs.print(gr.templatee.short_description);
Var inc = new GlideRecord('incident');
inc.initialize();
inc.short_description = gr.templatee.short_description
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2019 04:30 AM
checkout this community thread - https://community.servicenow.com/community?id=community_question&sys_id=c2f73626dbbaab80656a5583ca96...
Try
var t = new GlideTemplate.get('template sysid');
t.apply(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2019 04:30 AM
checkout this community thread - https://community.servicenow.com/community?id=community_question&sys_id=c2f73626dbbaab80656a5583ca96...
Try
var t = new GlideTemplate.get('template sysid');
t.apply(current);