Name
global.SHNTables
Description
Get a list of tables for which the user can create notes.
Script
var SHNTables = Class.create();
SHNTables.prototype = {
initialize: function() {
},
process: function() {
var result = [];
var gr = new GlideRecord("sn_shn_configuration");
gr.query();
while(gr.next()){
if (!this._shouldIgnoreTable(gr.table_name))
result.push("" + gr.table_name);
}
return result;
},
_shouldIgnoreTable: function(name) {
var gr = new GlideRecord(name);
if(gr.isValid() && gr.canCreate())
return false;
return true;
},
type: 'SHNTables'
};
Sys ID
f101850cc311120095ccd02422d3aec2