- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 03:47 AM
Hi All,
I have a requirement that need "Assigned to me " button on the incident form , this button should only display to users those who belongs to selected assignment group mentioned below Assignment group field in incident record. Means when selects the assignment group from assignment group field and he belong to that group then that button should be visible to him.when user click on “Assigned Me” button then his name will get populated in below Assigned to reference field.?
Please help me to complete this
Thanks
Deepika
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 03:52 AM
Hi,
You can add UI action condition for visibility
Remember the condition will evaluate only once i.e. when form loads and if you change the assignment group the button won't show/hide dynamically unless you save the record
gs.getUser().isMemberOf(current.assignment_group.toString())
UI Action Script:
current.assigned_to = gs.getUserID();
current.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 03:52 AM
Hi,
You can add UI action condition for visibility
Remember the condition will evaluate only once i.e. when form loads and if you change the assignment group the button won't show/hide dynamically unless you save the record
gs.getUser().isMemberOf(current.assignment_group.toString())
UI Action Script:
current.assigned_to = gs.getUserID();
current.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 08:31 PM
Hi Ankur,
Thanks for the response, it works for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 03:54 AM
You can create a UI Action on incident table with conditions
current.assignment_group != '' && gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())
In the script part use
current.assigned_to = gs.getUserID();
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 03:56 AM
you can user below condition in UI action
gs.getUser().isMemberOf(current.assignment_group.toString())