Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 04:06 AM - edited 11-01-2023 04:15 AM
Hi All,
Why after calling email script in notification next word goes into next line?
as you can see in below screenshot
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
//var link = current.getLink();
// var link = 'https://shldev.service-now.com/esc?id=hrm_ticket_page&sys_id=' + current.sys_id + ' &table=sn_hr_core_case_total_rewards' ;
var link = 'https://shldev.service-now.com/esc?id=hrm_ticket_page&sys_id=' + current.sys_id + ' &table=' + current.getTableName()
template.print('<font face="helvetica">');
var backgroundColor = 'background-color: #FFFFFF;';
var border = 'border: 1px solid #FFFFFF;';
var color = 'color: #0000FF;';
var fontSize = 'font-size: 16px;';
var fontFamily = 'font-family: Helvetica, Arial, sans-serif;';
var textDecoration = 'text-decoration: none; border-radius: 3px;';
var webKitBorder = '-webkit-border-radius: 3px;';
var mozBorder = '-moz-border-radius: 3px;';
var display = 'display: inline-block;';
var padding = 'padding: 5px;';
if (email_action.name == "Incident Survey") {
color = 'color: #343d47;';
backgroundColor = 'background-color: #e6e8ea;';
border = 'border: 1px solid #bdc0c4;';
}
template.print('<a href="' + link + '"');
template.print('style="' + backgroundColor + border + color + fontSize + fontFamily + textDecoration + webKitBorder + mozBorder + display + padding);
template.print('">');
template.print(gs.getMessage(current.number));
template.print('</a>');
template.print('</font>');
template.print('<br><br>');
})(current, template, email, email_action, event);
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 04:18 AM
Can you try removing below line from mail script & check :
template.print('<br><br>');
Vishal Birajdar
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 04:27 AM
Hi @SANDEEP28 ,
By default it is in span tag only