- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 05:27 AM
Hi All,
I have created an UI Action on Case form to create a Incident with all the information available on Case.
As "Service Offering" is not available on Case I have created a dialog box using UI Page and GlideModal asking for service offering.
But now everything is fine except the description is not getting copied with Line breaks. The Line breaks are getting disappeared in HTML in UI Page.
Requesting you to help me with this issue.
@Ankur Bawiskar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 06:53 AM
I was able to use solution from that link and used text area in HTML
UI Action:
UI Page:
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<g:evaluate var="jvar_sysid"
expression="RP.getWindowProperties().get('sysid')"/>
Description: <textarea id="description" rows="10" cols="30" name="description" value=""/>
</g:ui_form>
</j:jelly>
Client Script:
addLoadEvent(function(){
var m = GlideModal.prototype.get("showHTMLLineBreaks");
var p = m.getPreference("description");
document.getElementById("description").innerHTML = p; //create div with same id in HTML and set the innerHTML to the preference we grabbed from the Client Script
});
Output
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
06-25-2025 07:46 AM
I have modified as per your suggestions and it is working fine now.
Thank you so much for the quick help 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 08:46 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader