
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2014 07:45 AM
I'm running the following mail script and they would like the part highlighted in red to be the font color of red. If I try and add the HTML code for font color it fails and nothing shows up in the email. How can I get this one section to be in red.
<hr/>
<mail_script>
template.print("Summary of Requested item:\n");
var item = new GlideRecord("sc_req_item");
item.addQuery("sys_id", current.sys_id);
item.query();
while(item.next()) {
template.print(item.number + ": " + item.cat_item.getDisplayValue() + "\n");
template.print(" Item Options:\n");
var keys = new Array();
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() != '') {
template.space(4);
template.print(' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "\n");
}
}
}
</mail_script>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2014 11:36 AM
Either something like:
template.print(' ' + vs.get(i).getLabel() + " = <span style=\"color:red\">" + vs.get(i).getDisplayValue() + "</span>\n");
or:
template.print(' ' + vs.get(i).getLabel() + " = <span style='color:red'>" + vs.get(i).getDisplayValue() + "</span>\n");
should work. We use similar things in our notifications.
If not, check the logs or maybe turn on JS Debug to see if more information is available on what it doesn't like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2014 11:36 AM
Either something like:
template.print(' ' + vs.get(i).getLabel() + " = <span style=\"color:red\">" + vs.get(i).getDisplayValue() + "</span>\n");
or:
template.print(' ' + vs.get(i).getLabel() + " = <span style='color:red'>" + vs.get(i).getDisplayValue() + "</span>\n");
should work. We use similar things in our notifications.
If not, check the logs or maybe turn on JS Debug to see if more information is available on what it doesn't like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2016 09:16 AM
Hi, is there a way to highlight a specific text? I tried <mark> TEXT </mark> but it doesnt do anything.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2014 11:48 AM
It was the second code listed that worked.