Flow designer

Ashok_Bandla
Tera Expert

I have requirement to create Review catalog task and assign to asiign to group manager here is the script i am using 

var groupName = '';
var gr = new GlideRecord('sys_user_group');
gr.addQuery('sys_id', '1df6face4f6a28928110c7a5');
gr.query();
if(gr.next()){
    groupName = gr.manager.getDisplayValue();
   
}
return groupName;


here is the script i am using but it is not returning group name but returning in the while i am debugging

Ashok_Bandla_0-1753129816516.png

 

1 ACCEPTED SOLUTION

Swapna Abburi
Mega Sage
Mega Sage

Hi @Ashok_Bandla 

If you are trying to assign a task to group manager, update your script to return gr.manager instead of gr.manager.getDisplayValue().

 

Also, why the sys_id is small. It should be 32 char long. Please verify if you are passing the correct sys_id in your script.

View solution in original post

2 REPLIES 2

Swapna Abburi
Mega Sage
Mega Sage

Hi @Ashok_Bandla 

If you are trying to assign a task to group manager, update your script to return gr.manager instead of gr.manager.getDisplayValue().

 

Also, why the sys_id is small. It should be 32 char long. Please verify if you are passing the correct sys_id in your script.

Ashok_Bandla
Tera Expert

thank you @swapna , i added correct sys_id but in the post i gave random one for refernce