External link in Notification

chr_kluge
ServiceNow Employee
ServiceNow Employee

Hi everyone

 

I want to add a link to an external wiki page in some notifications. Because I need it in different languages and only in some cases I thought: hey lets use an notification email script.

It's not working. It produces everytime an link to the instane: http://<instance-name>.service-now.com

 

I'm not sure if it's an bug or some error in my script. Some suggestions?

externalLinkEmalScript.JPG

 

Thank you

Christina

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

something you have misplaced in the quotes and double quotes .. link to instance comes only if the url is setup incorrectly .. this should help



var attachLink = "<a href='http://wikipedia.de'> Link </a>";


template.print(attachLink);


View solution in original post

5 REPLIES 5

Anurag Tripathi
Mega Patron
Mega Patron

Hi Christina,



Use this anchor tag



var attachLink = "<a href='www.wikipedia.de' target='_blank'>" ;


-Anurag

Hi Anurag



I did change it as you asked me to. But that's the link that SNow produces:


https://steriadev.service-now.com/www.wikipedia.de



So that's really to strange.



Seems like a bug to me. What do you think?



Thanks


Christina


can you cross check that either on your email notification or your template , you are not using this line



gs.getProperty("glide.servlet.uri")   --> this gives the current instance name


-Anurag

Kalaiarasan Pus
Giga Sage

something you have misplaced in the quotes and double quotes .. link to instance comes only if the url is setup incorrectly .. this should help



var attachLink = "<a href='http://wikipedia.de'> Link </a>";


template.print(attachLink);