depts.Update
Overview¶
Update the specified department from "Server Script". This is a method of the depts object.
Methods¶
Parameters¶
| Parameter | Description | Required |
|---|---|---|
| deptId | Specify the department ID to update. | Yes |
| dept | Specify the department information to update as a JSON string. | Yes |
Usage Examples¶
The following example updates the extended column of department ID 2.
JavaScript¶
const deptId = 2;
const payload = {
ClassHash: {
ClassA: "test-class-column"
}
};
depts.Update(deptId, JSON.stringify(payload));
Return Value¶
| Type | Description |
|---|---|
| boolean | Returns true if the department is updated successfully, and false if it fails. |
Setting Values for Extended Columns¶
To set values for "Extended Column", specify the column name and value in ClassHash.
JavaScript¶
Supported Versions¶
| Supported versions | Body |
|---|---|
| 1.5.8.0 and later | Added function |