When applying template, auto assign Assignment Group and Assigned to based on who is applying the template/logged in?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2021 07:48 AM
Good Afternoon,
I am attempting to setup a few Incident templates and I would like them to auto fill the Assignment Group and Assign To fields when the template is applied.
Currently I have javascript:gs.getUserID(); to auto fill the Assigned To field with the current logged in user and this works fine and does the job.
However, is there a similar line of code etc. that could also auto fill the Assignment Group of the logged in user?
We are trying to refrain from using long client or server side scripts but can do if needed.
(I have attached a screenshot of the code above within the template and then also one of when the template is assigned)
This is require as without this being auto filled the ticket wont log.
Any help is much appreciated.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2021 08:02 AM
The logged-in user can be a part of multiple groups, May I know which group you would like to map in the Assignment Group field? If there's a specific group you can directly give the group in the template.
Best regards,
Sai Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2021 08:08 AM
This is true, we may have a few users that have multiple groups. Would there be a way to mark a group as primary and call for the primary group to be assigned?
For example if I was in the Assignment Group "Operations (Primary)" and the group "Service Desk (Secondary)" when i apply the template it will auto fill with the Primary Group that i am in, is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2021 08:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2021 08:10 AM
- User can be part of 1 or more groups.
- You want to assign incident to a group he is part of? which I think is not a best way to get faster resolution, You can use other dependencies like category or CI Support group or default group..etc to assign a incident
Check the concept of assignment rules where you can automatically set a value in the assigned_to/assignment_group fields when a set of conditions occurs.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP