The CreatorCon Call for Content is officially open! Get started here.

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

User151789
Mega Contributor

What is the best way to determine if the instance is prod or sub-prod from a UI Script?

8 REPLIES 8

Definitely.   This is the direction I am leaning.   I was just hoping for some client side element that's already there.  


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);


manikorada
ServiceNow Employee
ServiceNow Employee

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


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Shannon,



You may find the below thread as helpful.


https://community.servicenow.com/thread/167036