- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2022 02:48 AM
I have created a link "click here to reopen the incident" on Email script but it should be button not link on email. can any one help me where i am missing the point in below script.
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var url = '<a href="mailto:' + gs.getProperty('glide.email.reopen.incident') + '?subject=Re: Please reopen' + current.number + '&body=You can type a message before this text. Please do not edit the Subject or remove the following text: , or the record will not reopen%0D%0A' + email.watermark + '">' + 'click here to reopen the incident' + '</a>';
template.print(url);
})(current, template, email, email_action, event);
Thanks
SP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2022 11:02 PM
Hello,
It should be like this:
var url = '<a href="mailto:' + gs.getProperty('glide.email.reopen.incident') + '?subject=Re: Please reopen' + current.number + '&body=You can type a message before this text.
Please do not edit the Subject or remove the following text: , or the record will not reopen%0D%0A' + email.watermark + '"><img src=\"PIC.jpgx\" /></a>';
Best regards,
Boyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 01:35 AM
Hello,
Have you uploaded the picture that you will use in db_image?
Best regards,
Boyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 01:46 AM
yes uploaded the picture in the db_image. I am able to see it in preview notification and on incident form and i am not able to see it on outlook email.
I want to know what are the images supporte by outlook from servicenow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2022 01:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2022 04:54 AM
Hi,
Check this blog on how to add buttons in email body
Approve/Reject button in Approval notification
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2022 11:56 PM
Hi,
You can make use of existing functionality which already exist on the platform. If you look at OOB notification name "Incident Resolved" it displays aa button which you are looking for.
URL for the Notification :
https://instance.service-now.com/nav_to.do?uri=sysevent_email_action.do?sys_id=498162a20a0a0b4b00725fb9e5b6aeb3%26sysparm_view=advanced
Replace "instance' with your instance name.
Now if you want to do this for any of your Custom Notification then please follow the steps below:
1) There is a OOB Email Script which is available named "incident_take_me_to_the_incident". You just need to call it in your Notification where you want like below:
${mail_script:incident_take_me_to_the_incident}
Adding this line to the body of the Notification will add the button and you don't have to write any custom script here.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke