Translated HTML fields show HTML code in email notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2012 12:21 PM
For some reason when I include a field that is a Translated HTML field into an email notification, the HTML code prints and it looks like a mess. How do I get the data from the field to format properly? Regular HTML fields work fine.
I first noticed this when working on our kb_submission form. I'm trying to get the text to be included in the approval email notification. I'm also trying to include that same text in a notification to the Service Desk for Knowledge Articles are updated.
Thanks,
Rosa

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2013 11:54 AM
I'm still waiting for a response from SN, but in the meantime I was able to make it work via a workaround.
I've created a business rule on sys_email as follows:
Table: sys_email
When: before
Insert: checked
Condition: current.target_table == "kb_knowledge" && !current.instance.nil() // or any other criteria that applies to your table
Script:
var kb = new GlideRecord("kb_knowledge");
kb.addQuery("sys_id", current.instance);
kb.query();
if (kb.next()) {
current.body += "
" + kb.text;
}
Basically I'm letting the email notification create the email and right before is inserted I'm adding to the body the HTML content.
This is working fine but I wish there's no need to do it this way.
/Amado Sierra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2013 06:52 PM
In your notification do this(where current.description is your HTML field)
:
<mail_script>
template.print(JSUtil.unescapeText(current.description));
</mail_script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2023 03:43 PM
Hi @rosa8,
Did you find any solution on this issue?