how can check if plugin is active

abed_masrawa
ServiceNow Employee
ServiceNow Employee

hey,

how can i check if plugin is active without using GlideRecord ?

4 REPLIES 4

Rashmi Bansal
Mega Guru

Hi Abed,



Goto Plugins list in the left navigation and then search the name of plugin in the list and it will show you if it is active or inactive.



Thanks,


Rashmi


thanks,


But i meant to check it in the code .


For example by using client script :



this code in my client script   give me the answer  


var gr = new GlideRecord('v_plugin');


gr.addQuery('sys_id','com.snc.sa.metric');


gr.query();  


  if (gr.next()) {


  if ( gr.active =='active' ) {


.....


}


}



But i want to know if there is another way to check that ? may serviceNow have some API for this ?


Thanks,


Abed


Hello Abed,

Good Day!

var gr = new GlideRecord('v_plugin');

gr.addEncodedQuery('id=com.glide.app_api^active=active');

gr.query();

if(gr.next()){

return true;

}

 

Joe72
Tera Contributor

Server Side: GlidePluginManager.isActive('com.snc.pa.administration.console')

Does not work in Scoped Apps