- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 09:09 AM
Hi All,
Can we add url in showfield message in servicenow ? Please find my attachment.
If possible ,then let me know the correct point.
If not possible could you please tell me how to show the field message contents including url on the form ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 10:55 AM
A/C SN docs:
addInfoMessage(String message)
This message appears for approximately four seconds and then disappears. This timeout is not configurable at this time.
Checkout below link for more details for other message functions:
https://developer.servicenow.com/dev.do#!/reference/api/sandiego/client/c_GlideFormAPI#r_GlideFormAd...
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 11:49 AM
Hi,
showFieldMessage() function doesn't support HTML. If you want to add link, you have to go ahead with addInfoMessage().
Alternatively, you can follow below link:
To Create hyperlink in Client scripts, showFieldMsg
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 08:26 PM
Hi Aman,
Could you please tell me how to keep info message 2 minutes using script ? I want to keep few minutes afterthat it will gone.
can we achieve ?If possible please let me update in here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 10:55 AM
A/C SN docs:
addInfoMessage(String message)
This message appears for approximately four seconds and then disappears. This timeout is not configurable at this time.
Checkout below link for more details for other message functions:
https://developer.servicenow.com/dev.do#!/reference/api/sandiego/client/c_GlideFormAPI#r_GlideFormAd...
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 12:11 PM
It is possible to add a clickable link into an InfoMessage using the "RecordToHTML" function.
Here is a Display Business Rule I am using to provide a clickable link:
var getSdesc = current.short_description;
if (getSdesc.indexOf("created against Integration server" > -1)) {
var ogChg = [];
ogChg = getSdesc.toString().split('Change Request ');
var spl = ogChg[1].split(' has been');
var chgNum = spl[0];
var chgRec = new GlideRecord ('change_request');
chgRec.addQuery('number', chgNum);
chgRec.query();
if (chgRec.next()) {
var getChgSysId = chgRec.sys_id;
var chg2html = new RecordToHTML("change_request", getChgSysId, "${number}", true);
gs.addInfoMessage("Click here to view the Change Request: " +chg2html.toString());
}
}