Assign to Me button not working properly

boilermakernet0
Kilo Explorer

In our ServiceNow instance we have an 'Assign to me' button next to the Assigned to field where a user can click on that button and assign a ticket to themselves. Some of my users (they are definitely members of the particular group) have reported they get the attached message when clicking the button. It has never happened to me personally but others have had random issues with it.

Any assistance you could provide would be a great help.

Thanks!

assign to me.PNG

8 REPLIES 8

Matt Saxton - G
Kilo Guru

Cody,



See if you can isolate when this happens. Have you attempted to impersonate that user when the issue occurs?



Once you can get it to a reproduce-able test then validate gs.getUser().getMyGroups() is pulling back the assignment group which is showing.


Matt,



When the user is having the issue, I can impersonate them and can replicate the issue.



The strange part is if they type in their name or click on the magnifying glass next to the Assigned to field and select their name it populates their name correctly. Only the Assign to Me button malfunctions.


Mark Stanger
Giga Sage

I agree with Matt that more information is required to be able to isolate the issue.   There's a chance that the user can't read from the group table and security is causing an issue.



This solution originally came from SNGuru.   I've updated the post there with a script that is known to work.   The second script on the following page should be what you need.   If that doesn't work and you can reproduce it please let me know and I'll look into the issue.



http://www.servicenowguru.com/system-ui/ui-macros/add-me-ui-macro-user-group-fields/


Mark - I'm using your code "'add me' UI macro FOR THE 'Assigned to' FIELD" and it's working great. Is it possible to add an update and stay command in the script so that if the assignment can be done because the person is in the associated group it will automatically save the record? I tried adding the two lines below but it didn't work.



action.setRedirectURL(current);  


current.update();