Record Object Members
Explore the N/record module in SuiteScript for managing records, including methods for creating, updating, and deleting records.
The N/record module is essential for developers working with NetSuite records, offering a range of functionality to create, delete, copy, load, or modify records. This module supports both standard NetSuite records and custom record types, making it versatile for various scripting needs.
What is the N/record Module?
The N/record module is used to interact with NetSuite records programmatically. It allows developers to manage records efficiently through SuiteScript, which is the JavaScript-based scripting language for NetSuite.
Key Features of the N/record Module
- Standard and Custom Records: The module supports standard NetSuite records along with instances of custom record types. This flexibility allows for tailored solutions depending on business requirements.
- Access Methods: The N/record module provides methods for record operations like creating, loading, copying, deleting, and more, making it a foundational tool for developers.
N/record Module Members
The N/record module consists of various members categorized into objects, methods, and enums:
Object Members
| Name | Type | Description |
|---|---|---|
record.Column | Object | Represents a column of a sublist on a standard or custom record. |
record.Field | Object | Represents a field in the body or sublist on a standard or custom record. |
record.Record | Object | Represents a NetSuite record. |
record.Sublist | Object | Represents a sublist on a standard or custom record. |
Method Members
| Name | Return Type | Description |
|---|---|---|
record.create(options) | record.Record | Creates a new record. |
record.delete(options) | number | Deletes a record. |
record.load(options) | Object | Loads an existing record. |
record.submitFields(options) | Object | Updates and submits body fields on an existing record. |
record.transform(options) | record.Record | Transforms a record from one type to another. |
Enum Members
| Name | Type | Description |
|---|---|---|
record.Type | enum | Holds string values for supported record types. |
Best Practices
- Always use the appropriate object and method types for the specific records you are working with to ensure smooth integrations and operations.
- Avoid direct access to the NetSuite UI through the Document Object Model (DOM). Instead, utilize SuiteScript APIs to interact with records and UI elements.
Conclusion
Understanding the N/record module and its members is crucial for effective SuiteScript development in NetSuite. By familiarizing yourself with its capabilities and best practices, you can leverage the full potential of record handling in your NetSuite applications.
Source: This article is based on Oracle's official NetSuite documentation.
Key Takeaways
- The N/record module allows for sophisticated record management in SuiteScript.
- Both standard and custom records are supported, enhancing flexibility.
- Various object and method members are provided to streamline operations.
- Avoid DOM manipulation; use SuiteScript APIs for UI access.
Frequently Asked Questions (4)
Can the N/record module handle both standard and custom records?
What is the purpose of the `record.transform(options)` method in the N/record module?
Are there any best practices for using the N/record module?
What object members are included in the N/record module?
Was this article helpful?
More in Platform
- Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
- Asynchronous HTTP Requests with SuiteScript Promises
Use SuiteScript to send asynchronous HTTP requests with promises for efficient error handling and response processing.
- Setting Sublist Field Values in SuiteScript
Set values for sublist fields in SuiteScript using the setSublistValue method. Understand required parameters and error handling.
- In This Help Topic
Explore N/log module guidelines, log levels, and script execution logs for efficient logging in SuiteScript.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category