Mail script not working while trying to fetch GlideRecord from a non-task table using documet_id of approval record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 05:42 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:52 AM
Use off.addQuery('sys_id',current.sys_id) or off.addQuery('number',current.number) or off.addQuery('number',current.getValue('number'))
If my answer helps you please accept the solution and hit the like button, it helps community members to contribute more.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2024 03:58 AM
Hello @rambo1 ,
Try below script
var gr = new GlideRecord('u_capex_requests');
gr.get('sys_id', current.document_id);
var k = gr.getValue('u_requestor_name');
template.print(k.toString())