Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
How to create a version 2.0 in SuiteScript?
I am starting out to write some basic script of "hello world" , I have script below however when i create script record it looks like it is creating it in version 1.0
is there a setting so that it says 2.0 instead of 1.0 in NS?
**
*@NApiVersion 2.0
*@NScriptType ClientScript
*/
define(['N/ui/dialog'],
function(dialog) {
function helloWorld() {
var options = {
title: 'Hello!',
message: 'Hello, World!'
};
try {
dialog.alert(options);
log.debug ({
title: 'Success',
details: 'Alert displayed successfully'
});
} catch (e) {
log.error ({
title: e.name,
details: e.message
});
}
}
return {
pageInit: helloWorld
};
});