Email Notification is going out with 'Code' text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 01:47 AM
Hi,
Im having a problem that my notification is going out with the word 'Code' at the top and at the bottom. it happens only when I add comments or work_notes in the service operation workspace (I think its because the comments and workontes in the workspace are HTML).
This is my script:
function runMailScript( /* GlideRecord */ current, / TemplatePrinter */ template, /Optional Emailoutbound */
email, / Optional GlideRecord / email_action,
- /* Optional GlideRecord */
event) {
var commentorName event.parm2;
var userGr= new GlideRecord('sys_user 8 userGr.addQuery('sys_id, commentorName);
');
userGr.query();
if (userGr.next()) {
commentorName= userGr.name;
var user_name = userGr.user_name.toString();
}
var gr new GlideRecord('sys_journal_field");
gr.addEncodedQuery("sys_created_by=+ user_name); gr.orderByDesc("sys_created on) ;
gr.query();
if (gr.next()) { var comment gr.value.toString();
template.print(commentorName+":"+comment + "\"");
(current, template, email, email action, event);
The email output (ttt is the comment message):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 04:13 AM
@Ajay_Chavan this script will not remove the tags. How can I remove the tags of the 'Code'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 08:52 AM
In your mail script comment out the below line and replace it with what's below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2023 05:18 AM
