Examples
SuiteScript Custom Record
Creating a Custom Record
SuiteScript custom record extends NetSuite data with N/record.
Introduction to SuiteScript Custom Records
SuiteScript is a powerful tool that allows developers to extend and customize NetSuite's capabilities. Among its many features is the ability to create and manipulate custom records using the N/record
module. Custom records are custom-defined data structures that allow you to store information specific to your business needs.
Creating a Custom Record
To create a custom record in SuiteScript, you first need to define the record type within NetSuite. After defining the record type, you can use the N/record
module to create and manipulate instances of this record.
Here's how you can create a custom record instance:
Loading and Modifying a Custom Record
Once a custom record is created, you might need to load it to read or modify its data. The load
method allows you to retrieve a specific record by its internal ID.
Below is an example of how to load and update a custom record:
Deleting a Custom Record
If you need to remove a custom record from NetSuite, you can use the delete
method provided by the N/record
module. This method requires the record type and the internal ID of the record you wish to delete.
Here is an example of how to delete a custom record:
Conclusion
Custom records in SuiteScript offer a flexible way to manage business-specific data that doesn't fit into standard NetSuite records. By utilizing the N/record
module, you can create, read, update, and delete custom records efficiently. This guide has provided you with the basic operations needed to manage custom records, setting a foundation for more complex data manipulations.
Examples
- Previous
- Scheduled Task
- Next
- Search Query