Modules
SuiteScript N/record Module
Using N/record Module
SuiteScript N/record module manipulates NetSuite records.
Introduction to SuiteScript N/record Module
The SuiteScript N/record module is a powerful tool designed to interact with and manipulate records in NetSuite. This module provides methods for creating, reading, updating, and deleting records, making it essential for developers working with NetSuite's SuiteScript 2.0.
Loading a Record
To read or modify a record in NetSuite, you first need to load it using the record.load
method. This method requires the record type and the internal ID of the record you wish to load.
Creating a Record
Creating a new record involves using the record.create
method. You'll need to specify the type of record you want to create and set any required fields.
Updating a Record
Updating an existing record is similar to loading one. After loading the record, you can modify its fields using the setValue
method, and then save the changes.
Deleting a Record
To delete a record, use the record.delete
method with the record type and internal ID. This action is irreversible, so ensure you have the correct data before proceeding.
Conclusion
The SuiteScript N/record module is an essential tool for managing NetSuite records. Whether you're creating, retrieving, updating, or deleting records, understanding how to use this module will greatly enhance your ability to work efficiently within NetSuite.
Modules
- Previous
- Mass Update Scripts
- Next
- N/search Module