Need Clean HTML-Free Comment Display in Activity History from Scoped App Without Using journal_field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2025 06:00 PM
Hi all,
I'm working within the Third-Party Risk Management (sn_vdr_risk_asmt) application and trying to solve a common issue related to how HTML fields behave in the activity formatter.
Goal:
When users update any of our 11 custom fields (all of type HTML), we want to:
Log a clean version (stripped of all HTML tags)
Clearly label which field the comment came from (e.g., [ABC Comments])
Show this cleaned text in the activity history, so it's easily readable
Do this entirely within scope (no global writes or elevated access)
What I've Tried:Created a Journal Input field (u_comment_log)
Used a Before and After Business Rule to call setJournalEntry('u_comment_log', cleanText)
Also tried populating a String field (u_clean_comment_logInstead and added it to the activity formatter
Implemented logic to strip HTML using:
"var clean = htmlString.replace(/<\/?[^>]+(>|$)/g, ""); and also
"GlideStringUtil.stripHTML();Enabled audit tracking, made sure no_audit = false, set field as multi-line
Tried all combinations of:
Journal Input vs String
setJournalEntry() vs current.field = value
Before and After Business Rules
Current Roadblock:
Everything works technically — the field is populated correctly — but the cleaned comment does NOT appear in the activity stream unless the user manually toggles the funnel icon (activity filter) to uncheck/recheck the field.
I’m trying to avoid:
Writing directly to sys_journal_field (due to cross-scope restrictions and potential platform impact)
Changing global properties
Asking users to manually click funnel checkboxes to “wake up” the activity formatter
- Manual cross-scope access to sys_journal_field (denied due to platform restrictions)
Has anyone achieved this before?
Specifically:
Has anyone successfully forced a Journal Input or String field — populated in a scoped BR — to display in the activity stream without using sys_journal_field?
Is there a supported or best practice workaround for logging clean comment activity from HTML fields, within scope, that shows in the activity formatted?
Are there any platform-level limitations in scoped apps around this behavior?
Any guidance, tricks, or recommended alternatives would be deeply appreciated!
Thanks in advance 🙏

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2025 08:04 PM
Setting current.comments = 'value' will update the field’s value on the form,
but it will NOT create a journal entry in the activity history, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2025 08:11 PM
Yes, it will create a journal entry in the activity history and it is same as your manually input the comments field in form.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2025 08:25 PM
That didnt work. If you see below pictures which shows activity history. One with clean text and another with HTML tags. We want this tags to be removed when displaying under Activity history. I tried custom string field, journal input and OOB comments field. None of them working. Only if you uncheck & check back the field from activity formatted using the funnel, then it is displaying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @anand-bhosle ,
I have a similar use case where I need to store changes to an HTML-type field in audit history, but the output appears cluttered and unreadable. I'd appreciate your thoughts on how to handle this more effectively.