Record Object Members
Explore key members of the Record object in SuiteScript, including name, primary key, and properties for effective data handling.
The Record object in SuiteScript provides essential properties for managing data efficiently within NetSuite. It includes crucial members such as the record name, primary key, and its properties, supporting server-side scripts for powerful data manipulation. This article describes these members in detail and explains their significance in SuiteScript development.
What Are Record Object Members?
The Record object members available for a workbook.Record object include:
| Member Name | Type | Description | Supported Script Types |
|---|---|---|---|
Record.name | string | The name of the record type for the record. | Server scripts |
Record.primaryKey | number | The primary key of the record. | Server scripts |
Record.properties | Object | The properties of the record. | Server scripts |
Detailed Member Descriptions
-
Record.name: This property returns the string value representing the record type's name. It is essential to identify the specific type of record you are working with in your scripts. -
Record.primaryKey: This numeric property holds the primary key for the record, allowing for unique identification and referencing within operations. -
Record.properties: This object contains the properties associated with the record, enabling developers to access and manipulate relevant data easily.
Usage Notes
When using these properties, keep in mind:
- The
Record.nameproperty is read-only. Attempting to set its value after theworkbook.Recordobject creation will lead to aREAD_ONLY_PROPERTYerror.
For more information on SuiteScript and workbook modules, check the SuiteScript 2.x Script Types documentation.
Frequently Asked Questions (4)
Are the Record object members in SuiteScript available for all types of scripts?
Can I modify the value of the Record.name property in a SuiteScript?
What is the significance of the Record.primaryKey in SuiteScript?
What should developers be aware of when accessing Record.properties in SuiteScript?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
