Name
global.DictionaryUserFields
Description
Returns a list of fields that are references to sys_user for the table name provided.
Script
var DictionaryUserFields = Class.create();
DictionaryUserFields.prototype = {
initialize: function() {
},
process: function(tableName) {
answer=new Array();
var tables = new TableUtils(tableName).getTables();
for (var i=0; i<tables.size(); i++) {
var elem = String(tables.get(i));
var dictGr = new GlideRecord("sys_dictionary");
dictGr.addQuery('name', tables.get(i));
dictGr.addQuery('internal_type', 'reference');
dictGr.addQuery('reference', 'sys_user');
dictGr.query();
while(dictGr.next())
answer.push(dictGr.getValue("element"));
}
return answer;
},
type: 'DictionaryUserFields'
}
Sys ID
13268625732023004a905ee515f6a706