In change request form - assignment group field , how to make only those assignment groups visible in which logged in user is present ?

Ajay Sharma2
Tera Guru

In change request form - assignment group field , how to make only those assignment  groups visible in which logged in user is present. I want to make these changes only on change request form and not on incident and service request form.

1 ACCEPTED SOLUTION

 

Just tested this out and it is working

javascript: 'sys_idIN'+ gs.getUser().getMyGroups().toArray().join(",")

find_real_file.png

View solution in original post

5 REPLIES 5

Omkar Mone
Mega Sage

Hi 

Or you can call this below script include also :-

 

function getMySpecificGroups(){

   var gr = new GlideRecord('sys_user_grmember');

   gr.addQuery("user", gs.getUserID());

   gr.addQuery("group.active", true);

   gr.query();

   var array = [];

   while (gr.next()) {

           array.push(gr.getValue('group'));

   }

   return array;

}