Email Notification is going out with 'Code' text

rakshith_shetty
Tera Contributor

Hi Team,

 

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

 

Here is the script can someone assist

 

var notificationUtil = new IncidentNotificationUtil();
var comment = notificationUtil.getLatestCommentOrWorkNotes(current.getTableName(), current.getUniqueValue(), 'comments');
template.print('<div style="text-align: center; line-height: 36px; padding-bottom: 24px; border-bottom: 1px solid #DADDE2;"><span style="font-size: 24px; font-weight: 600; color: #181A1f;">' + comment.user + ' added a comment to Requested Item</span></div>');
template.print('<div style="font-size: 16px; padding-top: 24px; padding-bottom: 16px; color: #181A1F"><span style="font-weight: 700;">' + comment.user + ' </span>');
template.print('<span style="font-weight: 400;">left a comment on </span>');
template.print('<span style="font-weight: 700;">${number}:</span></div>');
template.print('<span style="font-weight: 600;color: #181A1F">' + comment.val + '</span>');

 

Regards

Rak**bleep**h

1 ACCEPTED SOLUTION

Chaitanya ILCR
Mega Patron

Hi @rakshith_shetty 

try this

var notificationUtil = new IncidentNotificationUtil();
var comment = notificationUtil.getLatestCommentOrWorkNotes(current.getTableName(), current.getUniqueValue(), 'comments');
template.print('<div style="text-align: center; line-height: 36px; padding-bottom: 24px; border-bottom: 1px solid #DADDE2;"><span style="font-size: 24px; font-weight: 600; color: #181A1f;">' + comment.user + ' added a comment to Requested Item</span></div>');
template.print('<div style="font-size: 16px; padding-top: 24px; padding-bottom: 16px; color: #181A1F"><span style="font-weight: 700;">' + comment.user + ' </span>');
template.print('<span style="font-weight: 400;">left a comment on </span>');
template.print('<span style="font-weight: 700;">${number}:</span></div>');
template.print('<span style="font-weight: 600;color: #181A1F">' + comment.val.replace('[code]','').replace('[/code]','') + '</span>');

replace them with empty space

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

1 REPLY 1

Chaitanya ILCR
Mega Patron

Hi @rakshith_shetty 

try this

var notificationUtil = new IncidentNotificationUtil();
var comment = notificationUtil.getLatestCommentOrWorkNotes(current.getTableName(), current.getUniqueValue(), 'comments');
template.print('<div style="text-align: center; line-height: 36px; padding-bottom: 24px; border-bottom: 1px solid #DADDE2;"><span style="font-size: 24px; font-weight: 600; color: #181A1f;">' + comment.user + ' added a comment to Requested Item</span></div>');
template.print('<div style="font-size: 16px; padding-top: 24px; padding-bottom: 16px; color: #181A1F"><span style="font-weight: 700;">' + comment.user + ' </span>');
template.print('<span style="font-weight: 400;">left a comment on </span>');
template.print('<span style="font-weight: 700;">${number}:</span></div>');
template.print('<span style="font-weight: 600;color: #181A1F">' + comment.val.replace('[code]','').replace('[/code]','') + '</span>');

replace them with empty space

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya