Best way to detect Prod or sub-prod from the client side?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 09:55 AM
What is the best way to determine if the instance is prod or sub-prod from a UI Script?
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 10:27 AM
Definitely. This is the direction I am leaning. I was just hoping for some client side element that's already there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 10:45 AM
if you are looking to just keep it in the ui script, you could always do
var gr = new GlideRecord('sys_properties');
gr.addQuery('name','glide.installation.production');
gr.query();
if(gr.next())
alert(gr.value);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 10:16 AM
Shannon,
From the UI Script, you can call a GlideAjax in which you can return a property 'glide.installation.production' which will have the required value whether its a production or not

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 10:51 AM