User record reference to the Group table changes how 'Assigned to' works

stevehuitt
Kilo Guru

I recently ran into some unexpected behavior. I added a field to the user table (sys_user) that referenced the Group table (sys_user_group). This was done so the group that owned web service accounts could easily be identified. This had a side effect of changing the list of users shown for the Assigned to fields in the task table and any table that extends it. Rather than showing a list of assignment group members as usual a list of users whose user record contained reference to the assignment group was shown. In other words to create the list of users to pick from it seems that the user table is first checked for a reference to to the group table and not the group member table (sys_user_grmember), and if a reference form the user table to the group table is found the group member table is bypassed.

Has anybody else experienced this? Can anybody explain this behavior?

Regards,

Steve

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Steve,



Sorry, I'm confused. Did you mean the reference field is now pointing to other table or a field? Can you please give more details. Screenshots will be helpful.


Hi Pradeep,



Here are some screenshots to make to help explain what I'm seeing. First, here's a shot of the members of the Application Development group:


Application Development members.png


Next, from an incident (but it could be anything that extends the task table) I specify the assignment group as Application development then click the magnifying glass icon on the Assigned to field to pick a member of the group to assign the incident to. The selection list matches the group member list as expected:


Assigned to list before sys_user update.png


Next, I added a field to the User table (sys_user) that references the Group table (sys_user_group):


sys_user update.png


Then returning to an incident I once again specify the assignment group as Application development then click the magnifying glass icon on the Assigned to field to pick a member of the group to assign the incident to. Now the selection list is empty:


Assigned to list after sys_user update.png


If I remove the reference form User table field to the Group table either by deleting the field or changing it to a non-reference field behavior goes back to normal. It seems that the code that creates the list of users to pick from for assigned to first check the User table for a reference to the Group table and if found selects users where the reference is to the assignment group. If there is no reference to teh Group table from the User table then it appears that the list of users is created from teh Group members table (sys_user_grmember).



Regards, Steve


Hello Steve,



Thanks for the update. Can you please share reference qualifier code/screenshot. If have this setup on your personal dev instance, I can take a look.


Hi Pradeep,



Here're screenshot of the dictionary entry for assigned_to showing the reference qualifier and dependent field:


Reference specification.png


Dependent field.png


These are from my personal instance and are OOTB settings. I've also verified this behavior in my company's dev instance.



Regards, Steve