Modules

filter

 

Objects/Functions

module (N/ui/dialog)

SuiteScript 2.0

dialog.alert(options)

{dialog}.alert({title: {string},message: {string}})

N/ui/dialog Module
dialog.alert()
Method Description: Creates an Alert dialog with an OK button.
Returns: Promise Object. To run a callback function when the OK button is clicked, pass a function to the then portion of the Promise object. When the OK button is clicked, true is passed to the callback. You do not have to utilize the Promise object unless there is an action you want performed after the user clicks the OK button.
Supported Script Types: Client scripts For more information, see SuiteScript 2.0 Client Script Type.
Governance: None
Module: N/ui/dialog Module
Since: 2016.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=dialog.alert(options)

Example:

// Code Example 1
//Add additional code
...
function success(result) { console.log('Success with value: ' + result) }
function failure(reason) { console.log('Failure: ' + reason) }

dialog.alert({
title: 'I am an Alert',
message: 'Click OK to continue.'
}).then(success).catch(failure);
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4497744851.html