UI Action change URL depending on the instance

dagarson
Tera Guru

Hello I have a ui action on a kba which opens the article in the service portal. However I wanted to see if there is a way to have the url change as I move the code through our instances. so the url will update for prod or dev.

Here is the code bellow 

find_real_file.png

Any assistance is appreciated. Thanks 

1 ACCEPTED SOLUTION

Harshad Wagh
Tera Guru

Just use following in place of line 5

var url = "/sp?id=kb_article&sys_id=" + gr;

ServiceNow will automatically append the current instance URL.

Thanks

Harshad

View solution in original post

1 REPLY 1

Harshad Wagh
Tera Guru

Just use following in place of line 5

var url = "/sp?id=kb_article&sys_id=" + gr;

ServiceNow will automatically append the current instance URL.

Thanks

Harshad