NetSuite dialog box with text field input

Using SuiteScript 2.0, it looks like you can create alert/confirmation boxes using their UI framework (using N/ur/dialog module). There’s a way to include a text input field (which the user can type into) on an alert or confirmation box.
This is not officially supported, but seeing that N/ui/dialog is basically a wrapper function on Ext.js, you can use the following to create a NS styled input box:

Ext.Msg.prompt('Title', 'Message', function(btn, text) {
    if (btn == 'ok') {
        alert('you said ' + text);
    }
});

Leave a comment

Your email address will not be published. Required fields are marked *