- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 11:03 AM
Hello team
I updated my existing resolve notification with a link , when the incident is resolved and if the user dont feel thats resolved , user can click on that link and it will open a email with pre defined subject and To field ,
when the user sent that email it will trigger a inbound email action and will set the state of the incident to work in progress .
Every thing is working fine
what if user manually changes the incident number (that will act on that Incident number ) so is there any way we can use the water mark from the resolved notification and act on the incident associated with that
when clicked on the link it will open like below (if user change the incident number that would be an issue), so can we use watermark from the above notification and act on the state?
Can we predefine the to address ?
Mail script which i am using
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var url='<a href="mailto:' + gs.getProperty('glide.email.user') + '?subject=Re: Please Reopen the incident '+current.number+'">'+ 'click here to reopen the incident' +'</a>';
template.print(url);
})(current, template, email, email_action, event);
one more issue is there is a UI action to reopen the incident (OOB ) which is not visible on incident , what is the condition meaning ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 12:22 PM
You can pass the watermark like this
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var url='<a href="mailto:' + gs.getProperty('glide.email.user') + '?subject=Re: Please Reopen the incident '+current.number+'&body='+ email.watermark +'">'+ 'Click here to reopen the incident' +'</a>';
template.print(url);
})(current, template, email, email_action, event);
To prepdefine the To address, you should create the property 'glide.email.user' if it already doesnt exists in sys_property table and specify the to address there.
Following is the script. it means, incident can only be opened in Resolved State and it shouldn't be a Major Incident,
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 12:22 PM
You can pass the watermark like this
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var url='<a href="mailto:' + gs.getProperty('glide.email.user') + '?subject=Re: Please Reopen the incident '+current.number+'&body='+ email.watermark +'">'+ 'Click here to reopen the incident' +'</a>';
template.print(url);
})(current, template, email, email_action, event);
To prepdefine the To address, you should create the property 'glide.email.user' if it already doesnt exists in sys_property table and specify the to address there.
Following is the script. it means, incident can only be opened in Resolved State and it shouldn't be a Major Incident,
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 02:13 PM
Thanks Sanjiv
The water mark is copying properly , but it is on the starting of the body .how to show the below format
how to add a text : please type the reason below and send
watermark
and the code you mentioned at the bottom ,where do i need to put that ?
If i understand the code correctly if incident is resolved and any user can do it and not p1,p2,p3 correct ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 02:58 PM
Try this
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var url='<a href="mailto:' + gs.getProperty('glide.email.user') + '?subject=Re: Please Reopen the incident '+current.number+'&body=Please type the reason below and send.<br><br>'+ email.watermark +'">'+ 'Click here to reopen the incident' +'</a>';
template.print(url);
})(current, template, email, email_action, event);
The code was response to below question. the condition call that script to check if incident is in resolved state.
one more issue is there is a UI action to reopen the incident (OOB ) which is not visible on incident , what is the condition meaning ?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 08:17 PM