How to insert link in a field message on change client script in servicenow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2024 03:33 AM
How to insert link in a field message on change client script in ServiceNow. If this is not possible, could you please help us with other functionality.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2024 04:02 AM
You may follow anyone of the below approaches:
1. Create Rich Text Label type variable and show/hide this variable from the client script
2. you can use spModal to show the modal window which supports HTML with UI type as Mobile to run it on Service Portal. If this needs to be run on backend view as well then use GlideModal to show pop-up window with UI type as Desktop.
SpModal Example:
// note embedded html in message
var h = '<h4>Apple likes people to agree to lots of stuff</h4>'
// Line feeds added to the following lines for presentation formatting.
var m = 'Your use of Apple software or hardware products is based
on the software license and other terms and conditions in effect for the
product at the time of purchase. Your agreement to these terms is required
to install or use the product. '
spModal.open({
title: 'Do you agree?',
message: h + m,
buttons: [
]
}).then(function() {
}, function() {
})
GlideModal example: