- 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
10-08-2018 07:23 AM
... Which in turn means that Pauls issue is not fixed with the accepted solution.
(I can see this here as well on a dev instance).
If this post was helpful, I would appreciate if you marked it as such - thanks!
Best
Daniel
- 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
08-30-2023 11:55 PM
This notification just came up.
Must have been a false positive. The method doesn't do what it says on the tin.
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-15-2024 11:51 PM
Please check the "sn_appclient.instance_type" system property for this information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 07:40 PM
Just checked this, it's accurate now but has been incorrect for years (this is my dev instance).
