Servicely Administration
Scripting
User Object (Client and Server)
3 min
to assist in getting quick access to various details of a user record, we have two different versions of the user object one for server side, one for client side server to access the server side version of the user object, you can access it by doing the following //all lower case user; //this can then be used such as let userid = user getid(); method returns description string this gets the id of the currently logged in user record as a string string this gets the user name of the currently logged in user record as a string string this gets the first name of the currently logged in user record as a string string this gets the last name of the currently logged in user record as a string string this gets the primary email of the currently logged in user record as a string string this gets the timezone of the currently logged in user record as a string string this gets the company id of the currently logged in user record as a string table object this gets the whole table record version of the currently logged in user record as a table object array of strings this gets the role names of the currently logged in user record as an array of strings boolean this determines if the currently logged in user has a specific role and returns a boolean array of strings this gets the group ids of the currently logged in user record as an array of strings client to access the client side version of the user object, you can access it by doing the following //upper case first letter user; //this can then be used such as let userid = user getid(); method returns description string this gets the id of the currently logged in user record as a string string this gets the user name of the currently logged in user record as a string string this gets the first name of the currently logged in user record as a string string this gets the last name of the currently logged in user record as a string string this gets the primary email of the currently logged in user record as a string string this gets the timezone of the currently logged in user record as a string string this gets the role names of the currently logged in user record as an array of strings boolean this determines if the currently logged in user has a specific role and returns a boolean