Skip to content

groups.Get

Overview

Get the information of one group by specifying the group ID in Server Script.

Methods

groups.Get(groupId);

Parameters

Parameter Type Required Description
groupId long Yes Specify the group ID to get.

Usage Examples

const group = groups.Get(5);
if (group) {
    context.Log(group.GroupName + ', ' + group.Body);
} else {
    context.Log('The group does not exist.');
}

Return Value

Returns the "group object". For the layout of the object, see "Developer's Guide: Server Script: group". If no group exists with the specified ID, null is returned.

{
    "TenantId": 1,
    "GroupId": 5,
    "GroupName": "New Group",
    "Body": "dddddd",
    "Disabled": false,
    "ClassHash": {
        "ClassA": "test-class-column"
    },
    "NumHash": {
        "NumA": 100
    },
    "DateHash": {
        "DateA": "2026-08-19"
    },
    "DescriptionHash": {
        "DescriptionA": "Supplementary description"
    },
    "CheckHash": {
        "CheckA": true
    }
}

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. Extended columns that the user cannot view are not included in ClassHash and the other hashes.

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

Cautions

This is a method used in "Server Script". It cannot be used in "Script".

Supported Versions

Supported versions Body
1.5.8.0 and later Added the ability to get the values of extended columns
1.5.10.0 and later Changed the values of columns that the user cannot view to null