Skip to content

users.Create

Overview

Create a new "User" in "Server Script". This is a method of the users object.

Methods

users.Create(user);

Parameters

Parameter Type Required Description
user string Yes Specify the user information to create as a JSON string. For what to specify, see "JSON Data Layout: User".

Usage Examples

const payload = {
    LoginId: 'yamada',
    Password: '[Initial password]',
    Name: 'Taro Yamada',
    UserCode: 'U0011',
    DeptId: 3,
    Body: '[Description of the user to register]',
    Disabled: false,
    ClassHash: {
        ClassA: 'test-class-column'
    },
    NumHash: {
        NumA: 100
    },
    DateHash: {
        DateA: '2026-08-19'
    },
    DescriptionHash: {
        DescriptionA: 'Supplementary description'
    },
    CheckHash: {
        CheckA: true
    }
};

const createok = users.Create(JSON.stringify(payload));
context.Log(createok);

Return Value

Returns true if the specified "User" is created successfully, and false if it fails.

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 function