Created
May 19, 2017 16:44
-
-
Save kcimpulse/c16dd028b5681aabb5c62cf7251a0ecf to your computer and use it in GitHub Desktop.
Revisions
-
kcimpulse created this gist
May 19, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ var BackfillAssignmentGroup = Class.create(); BackfillAssignmentGroup.prototype = { initialize: function() { }, BackfillAssignmentGroup:function() { var gp = []; var a = current.assigned_to; //sys_user_grmember has the user to group relationship var grp = new GlideRecord('sys_user_grmember'); if(a){ grp.addQuery('user',a); } grp.addEncodedQuery("group.typeLIKEcff624593854010072edffb4849a2c4a"); //Set to your Group SID Type to limit amount of Groups. grp.query(); while (grp.next()) { gp.push(grp.getValue('group')); } // return Groups where assigned to is in those groups we use IN for lists return 'sys_idIN' + gp.join(','); }, type: 'BackfillAssignmentGroup' }; // Below is the Advanced Reference Qualifier for the Task Table Assignment Group Refrence Field - With No Attributes Needed. javascript:new BackfillAssignmentGroup().BackfillAssignmentGroup()