Skip to content

user

Overview

This object is used to read "User" information in "Server Script". It is retrieved by the Get method of the "users object".

Properties

No Property name get set type Description
1 UserId Yes No int User ID
2 DeptId Yes No int Department ID
3 LoginId Yes No string Login ID
4 Name Yes No string Name
5 UserCode Yes No string User code
6 TenantManager Yes No bool Tenant manager
7 Disabled Yes No bool Disabled

Columns you cannot view

From version 1.5.10.0, the values of columns that the user running the server script cannot view are null (the properties themselves remain). By default, only tenant managers can view TenantManager and Disabled.

You can change which columns can be viewed in Column.json. For details, see "Extended Column".

Usage Examples

In the example below, the "user object" for user ID 1 is retrieved from the "users object" and the user's name and department ID are output to the log.

JavaScript
let user = users.Get(1);
context.Log(`${user.Name},${user.DeptId}`);

Supported Versions

Supported versions Body
1.5.10.0 and later Changed the values of columns that the user cannot view to null