Professional Documents
Culture Documents
Glide User ServiceNow Client Script 1709610448
Glide User ServiceNow Client Script 1709610448
Glide User
firstName
lastName
userID
userName
getClientData()
getFullName()
hasRole()
hasRoleExactly()
hasRoleFromList()
setClientData()
hasRoles()
Glide User
1.firstName
Returns the current user's first name.
Example:
OutPut:
2.lastName
Returns the current user's lastName
OutPut:
Glide User
3.userID
Returns the sys_id of the current user.
Example:
OutPut:
4. userName
This property is the current user's username, for example gsmith02. It is not the user's name,
for example George Smith.
Example:
OutPut:
Glide User
5.getClientData()
Returns a client value set using setClientData() or GlideSession -- putClientData().
Session client data is a set of named strings that may be setup on the server
using GlideSession -- putClientData(). You can use getClientData() during form load
time to get information that the client script needs to make decisions about the
form. For example, to identify which fields should be visible.
Example:
OutPut:
6.getFullName()
Returns the first and last name of the current user.
Example:
OutPut:
Glide User
7.hasRole()
Returns true if the current user has the specified role or the admin role.
Example:
OutPut:
7. hasRoleExactly()
Determines whether the current user has the specified role.
Example:
OutPut:
Glide User
8. hasRoleFromList()
Returns true if the current user has at least one of the specified roles or has the admin role.
Example:
OutPut:
9. setVlientData()
Sets a client value that you can retrieve using getClientData().
Example:
Glide User
10.hasRoles()
Returns true if the current user has any role.
Example:
OutPut: