The CreatorCon Call for Content is officially open! Get started here.

How to edit assign to me button in agent workspace and add some rules to it?

rahul16
Giga Guru

‘Assign to Me’ button shows up on all New tickets right now. Clicking on it simply assigns the Incident to the current user irrespective of the Assignment group selected on the ticket

We should either -

i. Not show this button if the current user is not a part of the ticket’s assignment group.

ii. Give an error message letting the user know that the ticket cannot be assigned to them as they’re not a part of the group.

find_real_file.png

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

In the UI action "Assign to me", just add the below condition then ti will only show if the user is a part of the group:-

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

find_real_file.png

Please mark answer correct/helpful based on Impact

View solution in original post

17 REPLIES 17

Hello rahul

you need to write  a glideajax in the workspace script part and script include to achieve this

 

find_real_file.png

I did not get any alerts or error messages both in the agent workspace and normal incident form as well.

Hello rahul

In the workspace client script you cannot use server side code you need to use glideajax and script include to achieve it

can you send me the code please I am new to servicenow

find_real_file.png

This worked perfectly fine in agent workspace and normal incident form