- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:14 AM
Hi.
I've added a business role that's display top message with link to external URL. Google for example :
(function executeRule(current, previous /*null when async*/) {
var str ='<a href="www.google.com" target="_top" >Google </a>';
gs.addInfoMessage(str );
})(current, previous);
but the Hyperlink redirect to: https://my-instants-name.service-now.com/www.google.com and display "The page you are looking for could not be found".
I'll appreciate any help.
Thank you.
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:55 AM
Hi,
Use the below BR:
var str ='<a href="https://www.google.com" target="_blank" >Google </a>';
gs.addInfoMessage(str );
It will work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:20 AM
Hello Avi,
Have you tried to append https:// to the beggining of your link ? Let me know
Apart from that, try out window.location = link
Regards,
Michal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:44 AM
I've try it and it doesn't work either.
I'm not sure how to use window.location as hyperlink.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:55 AM
Hi,
Use the below BR:
var str ='<a href="https://www.google.com" target="_blank" >Google </a>';
gs.addInfoMessage(str );
It will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 01:08 AM
This work like a charm!
Thank you.