how to run apply template in scoped application using script include
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 10:57 AM
i have a requiirement where i have to populate a template in one of my scoped application custom table ...but eh apply template function is not working in scoped appllication ...i am stcuk
i dont want to make it populate by onchnage client script ...please help ....
Labels:
- Labels:
-
Scripting and Coding
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 11:02 AM
you need to it using glide ajax from client script.
Apply template function is server side which can be applied from script include and calll script include from client script.
Regards,
Sachin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2019 11:03 AM
you can use below in scoped app
var sys_id_of_template = '56a8e507db6b26405accd5f0cf96190b';
var grObj = new GlideRecord('incident');
var t = new GlideTemplate.get(sys_id_of_template);
t.apply(grObj);
Regards,
Sachin