Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to find the sys_id for assignment groups

rwagner
Giga Contributor

I am working with the inbound email actions and part of the script shows the sys_id for an assignment group. I want to change that assignment group and need to know how to find the sys_id for the group I want to use. How do I list out the sys_id's of all my assignment groups?

if (sentTo.toLowerCase().indexOf('mail@mymail.com') >= 0) {

  current.u_assignment_group = '582bfe9a37c15600372fa6d2b3990e1d'; //group1
    }

}

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Rich,



Go to group record and select copy sys_id.


Screen Shot 2016-08-04 at 10.35.15 AM.png


View solution in original post

11 REPLIES 11

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Rich,



Go to group record and select copy sys_id.


Screen Shot 2016-08-04 at 10.35.15 AM.png


Thank you... I just found it right before you responded.


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Rich,



You can also pass group display name as


current.assignment_group.setDisplayValue('PASS GROUP NAME HERE');


GlideRecord - ServiceNow Wiki


Mike Allen
Mega Sage

I think it is always easier to use something like this:



current.u_assignment_group.name = 'Service Desk';