Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 02:01 AM
I hope you are aware on how to include email script in email body
${mail_script:mailScriptName}
Sample email script
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
var taskID = current.sys_id;
var tableName = 'sc_req_item'; // table name
var instance_name = gs.getProperty('glide.servlet.uri');
template.print('Click here to view the request online <a href="' + instance_name + tableName +'&sys_id="' + taskID + '&view=sp' + '">' + taskNum + '</a>');
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader