Adding hyperlinks in javascript

turnea
Mega Expert

I have a workflow in which I need to add the Catalog Task's item description in script and include three hyperlinks within the text.   I tried doing it with HTML within the javascript but it didn't seem to like the quotation marks / apostrophes and it just didn't put anything into the description.   Pretty sure it's because the script got buggy from all of the quotation marks.   Just wondering if anyone had a better idea to get the hyperlinks into a workflow task?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You could pretty easily add a link to a journal field like work notes through the script area on the task activity with something like this:



var url = 'www.google.com';


var linkName = 'Link Name';


task.work_notes = '[code]<a href="' + url + '">' + linkName + '</a>[/code]';



The key to adding a link in a journal field is the code tags.


View solution in original post

5 REPLIES 5

SmitaH
Tera Contributor

Hi all, 
I need to post a clickable link of a related custom table record in work notes on RITM, how to achive this via flow designer flow?