Glidesystem (gs) to get current employee_number

Asep
Tera Contributor

Hi Everyone, 

i need to know employee_number from current user's using glidesystem to insert into default value.

 

Thanks

 

find_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

Hi,

this will work

javascript: gs.getUser().getRecord().getValue('employee_number');

Regards
Ankur

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron

Hi,

this will work

javascript: gs.getUser().getRecord().getValue('employee_number');

Regards
Ankur

Vaishnavi Lathk
Mega Sage

Hello,

It is also very simple to get user information even if the attribute you want to retrieve is not listed above by using a ‘gs.getUser().getRecord()’ call as shown here…

//This script gets the user's title
gs.getUser().getRecord().getValue('title');
 
for more exploration refere the below thread.

https://servicenowguru.com/scripting/user-object-cheat-sheet/

 

Regards,

Vaishnavi Lathkar