We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

build url based on system environment (PROD, TEST, DEV)

Bret Smith
Giga Guru

g_form.addInfoMessage ('<a href="https://servicehubdev.colorado.gov/servicehub" target="_blank">Click here to go to back to the ServiceHub home page</a>');

looking how to replace https://servicehubdev with the system value of the environment

1 ACCEPTED SOLUTION

maroon_byte
Mega Sage

Try:

 

g_form.addInfoMessage ('<a href="/servicehub" target="_blank">Click here to go to back to the ServiceHub home page</a>');

OR

g_form.addInfoMessage ('<a href="/" target="_blank">Click here to go to back to the ServiceHub home page</a>');

 

Alternative is to use an non-expiry announcement.

https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/build/service-portal/task/...

 

Regards,

Sharad

View solution in original post

2 REPLIES 2

maroon_byte
Mega Sage

Try:

 

g_form.addInfoMessage ('<a href="/servicehub" target="_blank">Click here to go to back to the ServiceHub home page</a>');

OR

g_form.addInfoMessage ('<a href="/" target="_blank">Click here to go to back to the ServiceHub home page</a>');

 

Alternative is to use an non-expiry announcement.

https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/build/service-portal/task/...

 

Regards,

Sharad

I used:

 

g_form.addInfoMessage ('<a href="/servicehub" target="_blank">Click here to go to back to the ServiceHub home page</a>');

 

and it worked fine.

 

Thank you