Message.show(options)

Method Description

Shows the message.

Returns

void

Supported Script Types

Client scripts

For more information, see SuiteScript 2.x Client Script Type.

Governance

None

Module

N/ui/message Module

Since

2016.1

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.duration

int | string

optional

The amount of time, in milliseconds, to show the message. The default is 0, which shows the message until 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, the value when you show it (this parameter) takes precedence.

2016.1

Errors

Error Code

Error Message

Thrown If

WRONG_PARAMETER_TYPE

Wrong parameter type: {1} is expected as {2}.

The options.duration is specified with a non-numerical value or non-string value.

Syntax

Important:

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 2", 
        message: "My Message 2", 
        type: message.Type.INFORMATION
    });
    myMsg.show({ duration : 1500 });
    ...
      //Add additional code 

          

Related Topics

General Notices