Skip to content

group

Overview

This object is used to read "Group" information in "Server Script". It is obtained using the Get method of the "groups object".

Properties

No Property name get set type Description
1 GroupId Yes No int Group ID
2 GroupName Yes No string Group name
3 Body Yes No string Contents
4 Disabled Yes No bool Disabled

Methods

No Name Description
1 GetMembers Get the "groupMember object" in the "Group".
2 GroupChildren Get the "group object" of the "Child Group" in the "Group".
3 ContainsDept Return true if the "Group" contains a "Dept".
4 ContainsUser Return true if the "Group" contains a "User".
5 ContainsChild Return true if the "Group" contains a "Child Group".

Usage Examples

In the example below, a "group object" with group ID 1 is obtained from the "groups object" and the department IDs and user IDs of the members are output to the log while "group members" are enumerated.

JavaScript
let group = groups.Get(307);
for (let member of group.GetMembers()) {
    context.Log(`${member.DeptId},${member.UserId}`);
}