Display hyperlink on form

Rj27
Mega Guru

Hi ,

I need to display a hyperlink on my form.
Currently the field is displaying entire url.
How can i display the hyperlink without DOM manipulation ?

My current ui policy script :
var message = "Click me!";
document.getElementById("<table_name>.<field_name>_link").innerHTML = message;

 

I am working in scoped application. The code above is working fine in global but not in scoped.

7 REPLIES 7

@Rj27 

then the only way is to use DOM manipulation

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Rj27 ,

 

Instead of this you can use Info Message to display hyperlink, example:

var link = '<a href="incident_list.do">List Link</a>';
gs.addInfoMessage('Incidents: ' + link);

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!

Hi Karan,
My requirement is to display like this..this is working fine in global but not in scope

Rj27_0-1685346614868.png