Client Script displaying sysid

Sonalp2695
Tera Expert

Hi All ,

 

I am trying to create an client script on incident with on change of assignment group gives currently selected assignment group.

 

but somehow it's giving sys id of assignment group , 

can someone correct me here

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

This is correct behaviour.

Assignment Group field is of type reference and for any reference field you will get the sys_id of selected record in all scripts using getValue() or dot walk.

Can you please explain why you want Group name?

Yo can try below:

var grp=g_form.getDisplayBox('assignment_group').value; 
alert(grp);

You can find some solutions on below links:

https://www.servicenow.com/community/developer-forum/how-to-get-the-assignment-group-type-in-client-...

https://www.servicenow.com/community/developer-forum/catalog-client-script-how-can-i-get-group-name-...

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

This is correct behaviour.

Assignment Group field is of type reference and for any reference field you will get the sys_id of selected record in all scripts using getValue() or dot walk.

Can you please explain why you want Group name?

Yo can try below:

var grp=g_form.getDisplayBox('assignment_group').value; 
alert(grp);

You can find some solutions on below links:

https://www.servicenow.com/community/developer-forum/how-to-get-the-assignment-group-type-in-client-...

https://www.servicenow.com/community/developer-forum/catalog-client-script-how-can-i-get-group-name-...

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande