Basics
SuiteScript Running Code
Running SuiteScript Code
SuiteScript code runs in NetSuite via scripts like Suitelets or scheduled scripts.
Understanding SuiteScript Execution Contexts
SuiteScript is a powerful tool used for extending the capabilities of NetSuite. It allows developers to execute JavaScript code on the NetSuite platform. This can be done through different types of scripts, including Suitelets and scheduled scripts, each serving unique purposes and execution contexts.
What are Suitelets?
Suitelets are server-side scripts that operate as custom web applications. They allow you to create dynamic, data-driven web pages that can interact with NetSuite data. Suitelets can accept HTTP GET and POST requests, making them ideal for building custom front-end interfaces in NetSuite.
Scheduled Scripts Overview
Scheduled scripts are designed to run at specific intervals or times. They are typically used for batch processing tasks, such as data imports, exports, or any other operations that need to be performed on a regular schedule. These scripts are executed in the background and do not have any user interface.
Choosing Between Suitelets and Scheduled Scripts
The choice between using a Suitelet or a scheduled script depends on the specific requirements of your NetSuite application. Suitelets are perfect for interactive applications or when you need a custom user interface, while scheduled scripts are ideal for backend processes that require automation and regular execution without user intervention.
Conclusion
Understanding when and how to use Suitelets and scheduled scripts is essential for effective SuiteScript development. By leveraging these tools, you can extend NetSuite functionality to meet your business needs effectively and efficiently. Experiment with both types of scripts to see how they can best serve your specific application scenarios.
Basics
- Previous
- Installation
- Next
- Syntax