Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

Not applicable

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

8 REPLIES 8

Not applicable

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

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

Hi Shannon,



You may find the below thread as helpful.


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