Name

global.DiscoverChoiceList

Description

Functions for choosing discover value on Discovery Schedules/Status

Script

var DiscoverChoiceList = Class.create();
DiscoverChoiceList.prototype = Object.extendsObject(AbstractAjaxProcessor, {
  getDefaultValue : function(table) {
  	var discoGr = new GlideRecord('sys_choice'); 
  	discoGr.addQuery('name', table);
  	discoGr.addQuery('element', 'discover');
  	discoGr.orderBy('sequence');
  	discoGr.setLimit(1);
  	discoGr.query();
  	if (discoGr.next())
  		return discoGr.getValue('value');
  },

  type: 'DiscoverChoiceList'
});

Sys ID

5104c3c677421110a760d14b8d5a994d

Offical Documentation

Official Docs: