Assign To Me UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 11:21 AM
Hi all,
I hope you're keeping positive in these hard times.
I'm running into a few issues with the 'Assign to me' button on our incident form. When this button is clicked, i'd like the assignment group to update along with the assigned to (of course).
I have this, below;
How do i make this so it updates the default assignee's assignment group too? I currently get this message;
Thank you all!
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 11:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 03:43 AM
Thanks for this,
I have the UI action already which works fine but i'd just like the assignment group to be cleared and populated with the logged in users assignment group too.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 12:44 PM
Hi,
Use setDisplayValue() to set the value in assigned to field in UI action.
Try this,
current.assigned_to.setDisplayValue(gs.getUserName());//here i set the logged in username to assigned_to reference field
current.update();
action.setRedirectURL(current);
Please Mark Correct/Helpful answer if it help you in any way.
Thanks and Regards,
Kunal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 12:57 PM
Hi there,
Concerning "i'd like the assignment group to update along with the assigned to". What should happen if a user is a member of multiple assignment groups? What assignment group should than be filled?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field