Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to display URL link from message

chanikya
Kilo Sage

Hi,

i have used below script , it is not displaying URL link in messge

g_form.showFieldMsg("testing" + "<a href='" + 'https://www.doc.servicenow.com '+ "'>" + "</a>" + " has been created");

22 REPLIES 22

hugogomes
Giga Expert

Try this way, the HTML doesn't seem quite right to me.

var link = '<a href="https://www.doc.servicenow.com">Link to site</a>';
var message = "<p>Testing "+link+" has been created!</p>";
gs.addInfoMessage(message);

i am getting result like this

 

 

find_real_file.png

hugogomes
Giga Expert

As I mentioned in another tread, I don't know what you are trying to do. In you screenshot, I can see you are trying to display a message using a Business Rule.


The code I've provided works fine in a Business Rule.

find_real_file.png