Worknotes does not display URLs as hyperlinks

Avinash72
Tera Contributor

Hi All,

 

The Worknotes in the incident is not displaying the Hyperlinks.

Avinash72_0-1761492071791.png

The KB should be Clickable and once clicked it should open it in a new tab.

3 REPLIES 3

Sarthak Kashyap
Tera Guru

Hi @Avinash72 ,

I tried your problem in my PDI and it is working fine for me plaese check below code

var gr = new GlideRecord('incident');
gr.get('d71b3b41c0a8016700a8ef040791e72a');
var url = '[code]<a href="' + gs.getProperty('glide.servlet.uri') + '/'+gr.getTableName() + '.do?sys_id=' + gr.sys_id + '" target="_blank">' + 'My Record' + '</a>[/code]';

gr.work_notes= url;
gr.update();

 

Result 

SarthakKashyap_0-1761502179726.png

 

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak

Hi @Avinash72 ,

Did my answer help you to resolve your query? 

If yes, then please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak

Ankur Bawiskar
Tera Patron
Tera Patron

@Avinash72 

that's not how journal entries render HTML.

If you wish to show HTML links then you need to wrap the HTML within [code][/code] tag

Then System considers it as HTML and will render it as link

how is the value getting populated? share the script

How to create a working links in the comments or worknotes in the activity stream. 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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