Mail script not working while trying to fetch GlideRecord from a non-task table using documet_id of approval record

rambo1
Tera Guru

var gr = new GlideRecord('u_capex_requests');

gr.get('sys_id', current.document_id);

template.print(gr.u_requestor_name);

tried this in mail script to get requestor name in email body, but it is not happening. Please suggest some alternatives to get requestor name in email body.

16 REPLIES 16

I just noticed you have gr.Query()... it should be lower case. Have you tried with gr.query()?


yes.. i did gr.query only. Is there any other way to check why glide script is not working in email script ?


Any signs of trouble in the system logs or email logs?


no trouble in email logs or system logs . Is there any other way to check why glide script is not working in email script ?


rambo1
Tera Guru

Found out that Glide query on the non task table is not working only in the email script. In background script or in UI macros it is working allright. The version is as per system diagonastics shows the following:


glide-helsinki-03-16-2016__patch11b-06-28-2017_07-06-2017_1657.zip .



Does anybody know about any known error or something ?