- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 03:26 PM
Missing the Ref:MSG string in my email hence the request does not get approved when button is clicked. How can i fix this issue and where do i look? The "omit watermark" box is unchecked.
var _waterMark = '';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id', current.sys_id);
gr.query();
if(gr.next()) {
_waterMark = gr.number.toString();
}
var link = "mailto:"+gs.getProperty('instance_name')+"@service-now.com?subject=Re:"+current.sysapproval.getDisplayValue()+" -approve&body="+_waterMark;
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 05:19 AM
Made changes to the mail script and it is now working correctly
var _waterMark = '';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id', current.sys_id);
gr.query();
if(gr.next()) {
_waterMark = gr.number.toString();
}
var link = "mailto:"+gs.getProperty('instance_name')+"@service-now.com?subject=Re:"+current.sysapproval.getDisplayValue()+" -approve&body="+email.waterMark;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 03:34 PM
Hi, what are the results of your debugging?
If I recall correctly I belive that the watermark is created\applied at the end of the outbound email process and cannot be referenced via mail_script, as it doesn't exist when mail_script runs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 06:13 PM
You are right. It is applied at the end of the outbound email and I also believe it should be automatically included in the email when a user clicks the approve or reject link/button. Just wondering why this isn't included in my approve button email body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 05:19 AM
Made changes to the mail script and it is now working correctly
var _waterMark = '';
var gr = new GlideRecord('sys_watermark');
gr.addQuery('source_id', current.sys_id);
gr.query();
if(gr.next()) {
_waterMark = gr.number.toString();
}
var link = "mailto:"+gs.getProperty('instance_name')+"@service-now.com?subject=Re:"+current.sysapproval.getDisplayValue()+" -approve&body="+email.waterMark;