Unexpected Behavior: Catalog Variable Showing Another User’s Phone Number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I encountered an unexpected issue and would like your help.
I created a catalog item in ServiceNow that displays the logged‑in user's own information and allows them to edit it if necessary.
However, one user reported that the phone number shown in the catalog actually belonged to another person.
The field is populated by a variable whose default value is:
javascript: gs.getUser().getRecord().getValue('phone');
The users are on different devices, but they access ServiceNow from the same global IP address.
Interestingly, the user whose phone number appeared had logged in earlier on the same day.
This looks like a possible session mix‑up, but I'm not sure.
Is it possible for gs.getUser() to return the wrong user in this situation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Thank you for your quick reply!
I asked the user to clear the instance cache using cache.do, then log out and log back in, and that resolved the issue.
However, I'm still unsure what caused the wrong user data to appear in the first place, so I'm a bit worried about the possibility of it happening again.
If you have any ideas about the root cause, I'd appreciate any insights.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @SeijiNscr,
check with that user if they are sure about the correct number.
Otherwise this is default value what you share and perhaps there is some onChange script that overrides it. The best approach would be to connect with that person to show you in a live session to check it immediately.
It is a default value so it shall be enough to load the form, or an admin can impersonate for that user yourself, no?
100 % GlideFather experience and 0 % generative AI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @GlideFather
Thank you for the suggestion.
I had the user send me a screenshot, and the phone number shown was indeed different from their own.
However, when I impersonated the user on my side and tested the catalog item, I was not able to reproduce the issue — the correct phone number appeared every time.
So the issue definitely occurred on the user’s side, but I still don’t know what caused it, especially since it didn’t happen again after clearing the instance cache.
This unpredictable behavior makes me a bit concerned about potential recurrence.
If it happens again, I will try to troubleshoot it immediately in a live session as you recommended.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@SeijiNscr and when you check the actual phone number in the record associated with that user on the sys_user table?
100 % GlideFather experience and 0 % generative AI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
37m ago
Hi @GlideFather
Yes, I checked the user’s record in the sys_user table.
The phone field for the user who reported the issue was actually NULL.
Because of that, no phone number should have been displayed for them at all.
This is exactly why the issue was noticed — despite the sys_user.phone value being NULL, a completely different user’s phone number was shown on the catalog item.
