see this link:
https://www.servicenow.com/community/developer-forum/gwtmessage-functionality/m-p/1780660
javascript:
var array = [sp+'<a target="_blank" href="/kb_knowledge.do?sys_id=' + kb_sys_id + '">KB50004xx</a>'+sp];
var sMsg = new GwtMessage().getMessage('moj.inc.hoth.work_notes_sesitive_data', array);
message - parameter highlighted:
Some other examples
var sInstruction1 = gs.getMessage("The value '{0}' needs substituting to '{1}'. The '{1}' has been derived from '{2}'", [
current.short_description,
'sd 1', 'sd 2'
]);
//var sFeedback='hello';
gs.addInfoMessage(sInstruction1);
var knowledge_sysid = '8aef1935474321009db4b5b08b9a7113';
var kbLink = '<a target="_blank" href="/kb_knowledge.do?sys_id=' + knowledge_sysid + '">KB0000030</a>';
var sFeedback2 = gs.getMessage('inc.msg.with.parameter', [
kbLink
]);
gs.addInfoMessage(sFeedback2);
where the message object contains:
Please refer to this link {0} for info
Comments
Post a Comment