Custom Coding
You can customize the NetSuite UI and business logic with scripting.
SuiteScript
You can use SuiteScript to extend NetSuite and customize, search for, and process your NetSuite data. SuiteScript gives you full-featured application-level scripting that support sophisticated procedural logic on both the client and server sides. There's also a SuiteScript Debugger for server scripts.
There are two versions of SuiteScript that you can use:
SuiteScript 2.0
SuiteScript 2.0 provides a modern API that's familiar to JavaScript developers. The modularity of SuiteScript 2.0 supports encapsulation, keeps your code organized, and avoids global variable and method naming conflicts. Automatic dependency management lets you focus on logic instead of dependencies and load order. SuiteScript 2.0 supports most standard JavaScript features and gives you programmatic access to NetSuite. You can use custom modules to load your preferred third-party JavaScript libraries.
SuiteScript 2.0 supports SFTP file transfer, data caching, search pagination, flat file streaming, and enhanced encryption, decryption, and hashing. It also provides asynchronous client-side processing with promises, map/reduce scripts that provide a structured framework for server-side scripts processing a large number of records, and support for all HTTP content types.
To get started with SuiteScript, see SuiteScript 2.x API Introduction. For details about supported script types, see SuiteScript 2.x Script Types. For SuiteScript 2.0 API reference documentation, see SuiteScript 2.x Modules.
You can't access all NetSuite fields and records with SuiteScript. The SuiteScript Records Browser and Records Catalog show which records, fields, sublists, search joins, search filters, search columns, and record transformations are supported. For more information, see Working with the SuiteScript Records Browser and Records Catalog Overview.
SuiteScript 2.1
SuiteScript 2.1 is the latest version of SuiteScript, based on the ECMAScript 2019 (ES2019) edition of the ECMAScript specification. It includes new language capabilities and supports all server script types, such as user event scripts, scheduled scripts, and Suitelets. SuiteScript 2.1 and future versions of SuiteScript will also support features planned for future editions of the ECMAScript specification using ES.Next. There's a dedicated debugger to help you debug SuiteScript 2.1 scripts.
This latest version of SuiteScript is separate from previous SuiteScript versions like SuiteScript 2.0. You can run SuiteScript 2.1 scripts alongside SuiteScript 1.0 and SuiteScript 2.0 scripts in your account, and your existing scripts are not affected. Use the @NApiVersion
JSDoc tag and a value of 2.1 to specify that your script uses SuiteScript 2.1.
For more information about SuiteScript 2.1, see SuiteScript 2.1. For more information about debugging SuiteScript 2.1 scripts, see Debugging SuiteScript 2.1 Scripts.
SuiteCloud Development Framework
SuiteCloud Development Framework (SDF) lets you customize your NetSuite account from an integrated development environment (IDE) on computer. For more information about getting started with SDF, see Getting Started with SuiteCloud Development Framework.
SDF lets you create customizations and deploy SuiteCloud projects to your NetSuite accounts. These projects are file-based and use XML to represent NetSuite objects, such as custom record types, custom record instances, workflows, and other customizations. The SDF XML reference guide describes how to structure these XML files, and the fields that are available. For more information, see Customizations Supported by SuiteCloud Development Framework and the SuiteCloud Development Framework XML Reference.
SDF also lets you include templates and SuiteScript files. You can build, validate, and deploy SuiteCloud projects locally using SDF. SDF improves code portability and provides a streamlined deployment process across various NetSuite account types.
While SDF lets developers use code to customize and deploy objects to an account, it also supports distribution and object copying.
-
To distribute a SuiteApp to accounts, see Distribution.
-
To copy a single custom record (including its dependencies) from one account to another account, see Copy to Account.