Options
- 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());
}
}