message.create(options)
Method Description |
Creates a message that can be displayed or hidden near the top of the page. |
Returns |
|
Supported Script Types |
Client scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2016.1 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
required |
The type of message to create. Set this value using the message.Type enum. |
2016.1 |
|
|
string |
optional |
The message title. This value defaults to an empty string. |
2016.1 |
|
string |
optional |
The content of the message. This value defaults to an empty string. |
2016.1 |
|
int | string |
optional |
The amount of time, in milliseconds, to show the message. The default is 0, which shows the message until Message.hide() Message.hide() is called. If you use a string, it will be parsed to a number. If you specify a duration both when you create the message and when you show it using Message.show(options), the value when you show it takes precedence. |
2018.2 |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/ui/message Module Script Sample.
//Add additional code
...
var myMsg = message.create({
title: "My Title",
message: "My Message",
type: message.Type.CONFIRMATION
});
...
//Add additional code