- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2019 10:02 PM
hi
i have designed a notification which looks like this:
now what i need to do is once i click on approve button it open a reply-to email window. Just Click 'Send' to forward the email back to ServiceNow and approve the request. The reply email is linked directly to the approval request in ServiceNow and it will look like below image
how can i achieve this through email script or any other way......please explain me in detail as am new to now and scripting
thanks in advance!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2019 10:25 PM
Hi,
Use the below code in email script
(function runMailScript(current, template, email, email_action, event) {
var apButStr = '<div><a href="mailto:dev11111@service-now.com?subject=re:' + current.number + ' - approve&body='+ current.number + ' - approve' +'"><br /><img style="align: baseline;" title="Click this button to mark approved" src="/approveButton.pngx" alt="Approved" width="142" height="41" align="baseline" /></a>';
var rejButStr = '<a href="mailto:dev11111@service-now.com?subject=re:' + current.number + ' - reject&body='+ current.number + ' - Reject' +'"><img style="align: baseline;" title="Click this button to mark rejected" src="/rejectButton.pngx" alt="Rejected" width="142" height="41" align="baseline" /></a></div>';
var full = apButStr + rejButStr;
template.print(full);
})(current, template, email, email_action, event);
Note:Use your instance URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2019 10:25 PM
Hi,
Use the below code in email script
(function runMailScript(current, template, email, email_action, event) {
var apButStr = '<div><a href="mailto:dev11111@service-now.com?subject=re:' + current.number + ' - approve&body='+ current.number + ' - approve' +'"><br /><img style="align: baseline;" title="Click this button to mark approved" src="/approveButton.pngx" alt="Approved" width="142" height="41" align="baseline" /></a>';
var rejButStr = '<a href="mailto:dev11111@service-now.com?subject=re:' + current.number + ' - reject&body='+ current.number + ' - Reject' +'"><img style="align: baseline;" title="Click this button to mark rejected" src="/rejectButton.pngx" alt="Rejected" width="142" height="41" align="baseline" /></a></div>';
var full = apButStr + rejButStr;
template.print(full);
})(current, template, email, email_action, event);
Note:Use your instance URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2019 12:56 AM
hi omkar,
i followed your steps and its working absolutely fine
thanks you so much for your effort a
note: if you are doing any activity related to emails then please check your email properties first
because of that code wasn't working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2019 01:08 AM
For that you need to use the inbound email action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2019 01:15 AM
omkar can you please tell me the steps
i am beginner so don't have much idea
