Developer Function: Server Script: context.AddMessage
Overview
This method outputs a message to the bottom of the browser in a "「Server Script」". Multiple runs will output multiple messages.
Syntax
context.AddMessage(message, css);
Parameters
Parameter | Type | Required | Overview |
---|---|---|---|
message | string | Yes | message |
css | string | No | CSS class name |
Return Value
There is no return value.
Usage Example
In the example below, the message is output when the "「Status Column」" is completed for the user with department ID 3.
JavaScript
try {
if (context.DeptId === 3 && model.Status === 900) {
context.AddMessage('Conditions met.', 'alert-information');
}
} catch (e) {
context.Log(e.stack);
}
CSS Class Name
The following CSS class names can be used. You can also create and assign your own CSS.
CSS class name | Style |
---|---|
alert-information | Display information with blue background |
alert-warning | Display warning with yellow background |
alert-success | Display success with green background |
alert-error | Display error with red background |