Dynamic url for dev and other instances

Sam198
Mega Guru

Hi all,

I have email notification going out on Outages, How is it possible to have a dynamic url that takes user to the Service status page of the portal.

 

https://<instance name>?id=services_status

I have seen mail scripts for this however, they mainly from email notification to Incident, Problem, etc, not sure what's best to go other way around - Incident notification > have a link that takes to the Service Outage? the reason to have this dynamic is because this will need to be tested on DEV and UAT instances.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use gs.getProperty('instance_name') to get instance name and then you can use that in dynamic formation

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

martinjose
Giga Contributor

Just give '/<you portal name>?id=services_status' it will work. Never give full instance hard-coded as it will not work in other instances.

eg: /sp?id=services_status ('sp' is out of box service portal name)

 

If you still want the instance name just configure the URL as <a href=" + gs.getProperty('glide.servlet.uri') +"<you portal name>?id=services_status">

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use gs.getProperty('instance_name') to get instance name and then you can use that in dynamic formation

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Please use : gs.getProperty('glide.servlet.uri')

 

Thanks,
Ashutosh

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sam,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader