- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 11:59 AM
Hello,
I am trying to figure out how to set the default assignment group on a particular record producer. Ideally, the script would be as simple as setting the assignment group to our service desk whenever that piratical record producer is used to create the record. I see where I can add a script to the record producer just not sure, how the script can be set to look at the name of the record producer and set assignment group or if that is the correct way to approach it.
Here is my attempt at doing this but the part I am not sure how to script is what I have in bold.
if(producer.name.getDisplayValue == 'Submit a Request to IT(RP)')
{
current.assignment_group = 'sys_id of the group';
}
Disclaimer: I am a service now administrator of our instance but I am not a programmer and after searching the community I couldn't find a script that I could adapt to my needs.
I appreciate any help someone could provide.
Thanks,
Nolan
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:06 PM
If you're using the script field in the record producer, you can just use the following to set the assignment group:
current.assignment_group = 'sys_id of the group';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:06 PM
If you're using the script field in the record producer, you can just use the following to set the assignment group:
current.assignment_group = 'sys_id of the group';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:10 PM
Wow even easier then I was thinking thank you very much Michael for the fast help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:14 PM
Can also do a current.assignment_group.setDisplayValue('Service Desk'); or whatever its label is so you don't have to use sysID. But if you ever change the name of the group you'd have to change the code too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:16 PM
Good to know Alan Thanks for the information.