We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

gs.addInfoMessage with external URL link

avid
Kilo Expert

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".

pnf.PNG

I'll   appreciate any help.

Thank you.

1 ACCEPTED SOLUTION

Hi,


Use the below BR:



var str ='<a href="https://www.google.com"   target="_blank" >Google </a>';


gs.addInfoMessage(str );  



It will work.


View solution in original post

5 REPLIES 5

michal29
Giga Guru

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


I've try it and it doesn't work either.



I'm not sure how to   use window.location as hyperlink.


Hi,


Use the below BR:



var str ='<a href="https://www.google.com"   target="_blank" >Google </a>';


gs.addInfoMessage(str );  



It will work.


This work like a charm!



Thank you.