Close note is HTML field, how to hide HTML tags from activity log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:12 AM
Hello. i needed to change the close note to HTML the same as our additional comment.
But with close note the HTML tags show up, it does not do this with our additional comments.
Any fix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:14 AM
Hi @asd22
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:20 AM
i tried to change the BR script that posts the comments
(function executeRule(current, previous /*null when async*/) {
current.comments = "Saken lukkes: " + gs.stripHTML(current.close_notes);
//current.u_additional_comments = "<p>Saken lukkes:</p><p>" + gs.stripHTML(current.close_notes) + "</p><p> </p>";
})(current, previous);
but this did not work, will try what you linked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:30 AM
try this and use this function
GlideSPScriptable().stripHTML
(function executeRule(current, previous /*null when async*/) {
current.comments = "Saken lukkes: " + GlideSPScriptable().stripHTML(current.close_notes);
//current.u_additional_comments = "<p>Saken lukkes:</p><p>" + gs.stripHTML(current.close_notes) + "</p><p> </p>";
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:36 AM
Hello again, thanks for the script. It removed the tags, but i see now this is not what i want.
Above is additinal commets(HTML field) and it keeps the text formant when posted.
Under you have close notes wich now is posted fine but it does not keep the format