Name

global.AgileGlobalUtils

Description

No description available

Script

var AgileGlobalUtils = Class.create();
AgileGlobalUtils.prototype = {
  initialize: function() {
  },
  
  getDeviceType: function() {
  	return GlideMobileExtensions.getDeviceType();
  },
  
  getThemeVersion: function() {
  	return new GlideThemeUtil().getThemeVersion();
  },
  
  getFlushStamp: function(type) {
  	return new GlideCacheManager.getFlushStamp(type);
  },
  
  getPreference: function(pref) {
  	return gs.getPreference(pref);
  },
  
  isPluginActive: function(name) {
  	return pm.isActive(name);
  },

  updateSysDictionary: function(tableName,columnName,attribute,value){
  	var gr = new GlideRecord("sys_dictionary");
  	gr.addQuery("name", tableName);
  	gr.addQuery("element",columnName);
  	gr.query();
  	if(gr.next()){
  		gr.setValue(attribute, value);
  		if(gr.update()){
  			gs.info('Updated the '+attribute+' attribute for '+columnName+' column in '+tableName);
  		}else{
  			gs.info('Unable to update the '+attribute+' attribute for '+columnName+' column in '+tableName);
  		}
  	}else{
  		gs.info('Could not find '+columnName+' column in '+tableName+'. Skipping update');
  	}
  },
  
  isGlideAdvancedUI : function(){
  	return isAdvancedUI();
  },

  type: 'AgileGlobalUtils'
};

Sys ID

c755055187411300b9392c7c87cb0b0b

Offical Documentation

Official Docs: