Name

sn_table_builder.GetAdditionalInformation

Description

For additional info mapping Keeping this SI for future purpose. Revive the ADDITIONAL_INFO_TABLE table, if needed

Script

var GetAdditionalInformation = Class.create();
GetAdditionalInformation.prototype = {
  initialize: function(table, sysId, fallback) {
      this.fallback = fallback;
      var gr = new GlideRecord(TBConstants.ADDITIONAL_INFO_TABLE);
      gr.addQuery('table', table);
      gr.addQuery('document_id', sysId);
      gr.query();
      if (gr.next()) {
          this.record = gr;
      }
  },

  getIcon: function() {
      if (this.record)
          return this.record.getValue('icon') || '';
      else
          return '';
  },

  getImage: function() {
      if (this.record)
          return this.record.getValue('image') || '';
      else {
          var scalar_type = this.fallback;
          return TBConstants.FALLBACK_IMAGE_MAP[scalar_type] || '';
      }
  },

  type: 'GetAdditionalInformation'
};

Sys ID

bdb62ecac722101031a006d427c26069

Offical Documentation

Official Docs: