We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Get current username of logged in user

ankul
Tera Contributor

Hello Everyone,

I want current username of logged in user through Glide System.

Regards

Ankul

6 REPLIES 6

Vaishnavi Lathk
Mega Sage
 
Hey
 
getUserName() is the method of glide system used to find current logged in user's name. Below is the link of service-now wiki where u can find all the methods of glide system. Returns a reference to the User object for the current user.
 
 

salma98
Tera Expert

Use gs.getUserName() to get  current logged in username. You can put this as query in GlideRecord as


ga.addQuery('user_name',gs.getUserName());