Name

global.CSMDomainLookupVerifyUtil

Description

Utility functions to support lookup and verify for domain separated instance

Script

var CSMDomainLookupVerifyUtil = Class.create();
CSMDomainLookupVerifyUtil.prototype = {
  initialize: function() {},

  getConfigSysId: function(configId, table, recSysId) {
      var currentRecord = this.getRecord(table, recSysId);
      var gr = new GlideRecord('sn_lookup_verify_config');
      if (gr.isValidField('id'))
          gr.addQuery('id', configId);
      gr.addQuery('active', 'true');
      if (gs.getProperty("glide.sys.domain.use_record_domain_for_processes") == 'true')
          gr.addDomainQuery(currentRecord);
      gr.query();
      if (gr.next()) {
          return gr.getUniqueValue();
      } else
          return '';
  },

  getRecord: function(table, recSysId) {
      var currentRecord = new GlideRecord(table);
      currentRecord.get(recSysId);
      return currentRecord;
  },

  type: 'CSMDomainLookupVerifyUtil'
};

Sys ID

7e0b888a738110106dfdbd49faf6a7f3

Offical Documentation

Official Docs: