how to run apply template in scoped application using script include

Rahul Gupta
Tera Contributor

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 ....

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

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

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