Name
global.DictionaryUserGroupFields
Description
Returns a list of fields that are references to sys_user_group for the table name provided.
Script
var DictionaryUserGroupFields = Class.create();
DictionaryUserGroupFields.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_group');
dictGr.query();
while(dictGr.next())
answer.push(dictGr.getValue("element"));
}
return answer;
},
type: 'DictionaryUserGroupFields'
}
Sys ID
8fcf8ea5732023004a905ee515f6a7d5