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

Mike Patel
Tera Sage

use g_form.addinfomessage instead of FieldMsg

 

FieldMsg is for message you want to show under some field

Hi,

 

Using with g_form.addinfomessge  it is dipslaying,

 

but here request is need to dispalay  message URL under field , is it possible to display it

Jaspal Singh
Mega Patron
Mega Patron

Hi,

 

You can try something as below

 

link = '<a href='" + 'https://www.doc.servicenow.com '+ "'>" + "</a>';
message = gs.getMessage("Testing {1} has been created");
message = message.replace("{1}", link);
gs.addInfoMessage(message);

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

Hi Jaspal,

 

is it possible to display this message under field using with g_form.showFieldMsg