Get values from template
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 02:36 AM
Hi
we have a requirement to update the template values through the script.
var grTemplate = new GlideRecord('sys_template');
grTemplate.addQuery('sys_id','2e43edbfdb155428a497574b6896199c');
grTemplate.query();
if(grTemplate._next())
{
var string = grTemplate.template.toString();
// how can we proceed here to get the value of field & update the value with new.
}
15 REPLIES 15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 04:16 AM - edited 02-08-2024 04:17 AM
I hope you have changed the field names as per your form fields ? I just tested this on my PDI and I am able to manipulate template fields.
Also, the Sys_id of the template is replaced as per your template.
Please mark this response as correct and helpful if it assisted you with your question.