
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 09:11 PM
I'm looking for a way to determine if an instance is Production.
I noticed there is a system property, glide.installation.production
However, this is set to true on every instance!
On HI, the instance in question is listed correctly as being Non-Production.
Is there a reliable, configuration agnostic way to tell from within the instance if it is Production or not?
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2016 07:05 PM
GlideUtil.isProductionInstance()
However this is not available in Scoped Code.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 11:21 PM
As Dominic and Daniel have mentioned, the accepted solution is not correct at all.
For my use case I ended up setting a new System Property to store the name of the Production instance and a function in an open-access global scope Script Includes that performs an equality check against instance_name.
It's not OOTB, but has advantages in that it doesn't modify existing properties, and works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 09:19 PM
1.You can create a new property and mark production instance by setting some values there.
2.In script use gs.getProperty() method to call this property and find out instance is production or not.
Thanks,
Mihir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2016 09:25 PM
This needs to be a solution that can be applied to any given instance without any manual intervention.
Otherwise I'd just change the property that already exists and use that.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2016 07:05 PM
GlideUtil.isProductionInstance()
However this is not available in Scoped Code.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 10:01 PM
It should be noted that this API Call relies on the underlying system property: "glide.installation.production"
This will define the value that is returned, being either true or false.