- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2015 07:51 AM
We have several environments of our Service-Now instance (PROD/TEST/DEV). We have a script that needs to call out to different versions of a web service depending on whether the call originated from a DEV instance or a PROD instance. Is there any function/property accessible from the business rule script that can tell me what instance it's presently running on? If so, I can use that to instantiate the correct web service and make the call.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2015 12:10 AM
Hi Stephen,
If you want to fetch the instance name from the script. You can fetch the property value i.e "instance_name" from the sys_properties table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2015 08:45 AM
Seems like I may be able to use the following to read the host: var headerValue = g_request.getHeader("host"); but this doesn't work when I access the "g_request" object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2015 12:10 AM
Hi Stephen,
If you want to fetch the instance name from the script. You can fetch the property value i.e "instance_name" from the sys_properties table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2015 01:10 AM
Hi,
you may use following: RP.getReferringURL() to get your instance name
P.S. How to access a URL inside g:evaluate tag in Jelly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 08:47 AM