Need a"Assigned to me" UI action in incident form and visble to particular group users?

Deepika61
Tera Contributor

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

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Thanks for the response, it works for me.

suvro
Mega Sage
Mega Sage

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();

Kunal33
Tera Expert

you can user below condition in UI action

gs.getUser().isMemberOf(current.assignment_group.toString())