Message.show()

Note:

The content in this help topic pertains to SuiteScript 2.0.

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 for message.create() and message.show(), the value from the message.show() method call 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.

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

message.Message
N/ui/message Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices