Modules

filter

 

Objects/Functions

module (N/ui/dialog)

SuiteScript 2.0

dialog.confirm(options)

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

N/ui/dialog Module
dialog.confirm()
Method Description: Creates a Confirm dialog with OK and Cancel buttons.
Returns: Promise Object. To run a callback function when the OK button is pressed, pass a function to the then portion of the Promise object. The value of the pressed button, where OK is true and Cancel is false, is passed to the callback.
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.confirm(options)

Example:

// Code Example 1
//Add additional code
//...
var options = {
title: "I am a Confirmation",
message: "Press OK or Cancel"
};

function success(result) {
console.log("Success with value " + result);
}

function failure(reason) {
console.log("Failure: " + reason);
}

dialog.confirm(options).then(success).catch(failure);

//...
//Add additional code

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