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

akashsrm100
Kilo Guru

Hi Avi


var str= "Google";


gs.addInfoMessage('<a href="https://www.google.com" target="_top">'+str+'</ a>');


I have checked it and verified




Thanks


Akash Sharma



Ps HIt like /correct if applicable