insert hyperlink in additional comments

priya92
Kilo Expert

Hi

we have scenario where case is linked to RITM and updates on the RITm is copied to case additional comments to be sent to external customer via workflow script of RITM

Snapshot of the code which updates case is as below and this is all working fine 

Now the requirement is we need the comments variable appended with a url  along with RITM variables, basically i need to a way to plug in html anchor tag in side the var comments.

 

 

find_real_file.png

1 ACCEPTED SOLUTION

try

[code]<a href="https://google.com" target="_blank">Google</a>[/code]

View solution in original post

13 REPLIES 13

You can apply that code directly in the additional comments field.

This works great, but for some reason it creates 2 URL side by side, one with the correct link and another with the name of my flow, which is a URL to open my flow. Any idea why it could do that ?

Bruno Moreira
Tera Expert

 

 Any simple Example :

 

var gr = new GlideRecord("sc_request");
gr.query();
var myMessage = 'Click Here - The Best Brazilian Socccer Team site ';
var myUrl = 'www.fluminense.com.br'
if (gr.next()) {
    gr.comments '[code]<a href=' + myUrl + '>' + myMessage + '</a>[/code]'
    gr.update();
}

AbdelH
Tera Contributor

Hello, thank you for the tip
As a complement I would like to add this for opening the url in a new tab/windows, to avoid blocked urls (external) as follows :

[code]<a href="http://www.service-now.com" target="_blank">ServiceNow</a>[/code]