Unexpected Behavior: Catalog Variable Showing Another User’s Phone Number

SeijiNscr
Tera Contributor

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?

12 REPLIES 12

@SeijiNscr 

I still believe it was a cache issue which occurs sometimes.

If it still happens sometime later then you can do thorough investigation and raise a case with ServiceNow if you are unable to figure out the root cause

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

It sounds to me like there might be some issue with phone formatting, 

please @SeijiNscr could you ensure and/or compare phone numbers with other users?

 

Phone number is starting with the country code that can be transcript as (+351) or (00351), then the actual phone number 12345678 or (123) 456789 or 123 456 789... or I don't know what else.

 

And I am already out of ideas, good luck! :))

_____
100 % GlideFather experience and 0 % generative AI

Tanushree Maiti
Kilo Patron

Hi @SeijiNscr 

 

Ask the user to check it in incognito/private browser as ServiceNow relies heavily on session cookies. If those aren’t cleared properly, gs.getUser() can behave unpredictably.

 

Refer: KB0693221 ServiceNow Cookies 

 

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: