Since NetSuite uses SuiteScript, a JavaScript-based scripting environment, developers access the platform’s API, allowing direct interactions with records and fields on NetSuite servers. Here’s how data is processed:
- Backend SuiteScript Model: Extends service controllers to perform actions like create, update, and delete. These actions are accessed by routers and executed on the server, keeping business logic secure.
- Service Controllers: Introduced in the Vinson release, these allow a standardized way to handle services by generating boilerplate code, reducing the need to create repetitive service files manually.
Configuration and Customization
- NetSuite provides a centralized configuration file (e.g: distro.json) to register modules and apply dependencies.
- The configuration setup allows for toggling features on/off based on admin settings, enhancing control over module functionalities.
Practical Flow for Module Development
- Initialize your module by adding it to distro.json and enabling configurations through NetSuite’s backend.
- Deploy and test by pushing the code to the site, enabling its configurations, and navigating to the module’s page in the front end to verify that it renders correctly.
- Develop and validate by extending base classes, defining custom models, views, templates, and CRUD operations using service controllers.