dept
Overview¶
This is an object for reading "Depts" information in "Server Script". It is retrieved using the Get method of the "depts object".
Properties¶
| No | Property name | get | set | type | Description |
|---|---|---|---|---|---|
| 1 | DeptId | Yes | No | int | Department ID |
| 2 | DeptCode | Yes | No | string | Department code |
| 3 | DeptName | Yes | No | string | Department name |
| 4 | Body | Yes | No | string | Contents |
| 5 | 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 Disabled.
You can change which columns can be viewed in Column.json. For details, see "Extended Column".
Methods¶
| No | Name | Description |
|---|---|---|
| 1 | GetMembers | Get the "user object" of the users who belong to the group. |
Usage Examples¶
In the example below, the "dept object" of the department to which the logged-in user belongs is retrieved, and the department code and department name are output to the log.
let myDept = depts.Get(context.DeptId);
if (myDept) {
context.Log(`${myDept.DeptCode},${myDept.DeptName}`);
}
Supported Versions¶
| Supported versions | Body |
|---|---|
| 1.5.10.0 and later | Changed the values of columns that the user cannot view to null |