N/config Module Members for SuiteScript Integration
The N/config module provides methods to access NetSuite configuration settings via SuiteScript, enabling streamlined script integrations.
The N/config module is essential for accessing configuration settings within NetSuite using SuiteScript. Specifically, the config.load(options) method returns a record.Record object, allowing you to work with configuration settings without requiring the N/record module. This functionality is particularly useful for integrating configurations at the script level.
What are the N/config Module Members?
The N/config module includes various members that facilitate interaction with configuration settings. Below is a summary of the key members:
| Member Name | Type | Return Type | Supported Script Types | Description |
|---|---|---|---|---|
config.load(options) | Method | record.Record | Server scripts | Loads a record.Record object that encapsulates the specified configuration page. |
config.Type | Enum | enum | Server scripts | Holds string values for supported configuration objects, aiding in setting the appropriate configuration for config.load(options). |
config.load(options) Method
The config.load(options) method is used to load a configuration record. Once the configuration page is loaded, preference names and IDs become accessible for both retrieval and updates.
Key points regarding config.load(options) include:
- You can access configuration settings through a
record.Recordobject. - It is crucial to specify the configuration type in the
optionsparameter, using theconfig.Typeenum.
Parameters for config.load(options)
The method accepts an options object, which includes the following parameters:
options.type:enum(required) - Specifies the NetSuite configuration page to access.options.isDynamic:boolean(optional) - Indicates whether to load the record in dynamic mode (real-time calculations) or standard mode (processed upon saving).
JavaScript Error Codes
The method can throw the following error if there’s an issue with the record type:
INVALID_RCRD_TYPE: Thrown when thetypeargument is invalid or missing.
Accessing Configuration Preferences
Once you have loaded the configuration using the config.load(options) method, you can use various record object members to interact with preferences, such as:
Record.getField(options)Record.getValue(options)Record.setValue(options)
This allows for a comprehensive approach to managing configuration settings directly through SuiteScript.
Who This Affects
- Administrators: will benefit from streamlined configuration management.
- Developers: can leverage the N/config module in SuiteScript applications.
- Script Authors: looking to integrate configuration settings into their solutions.
Key Takeaways:
- The N/config module provides streamlined access to configuration settings in NetSuite.
- The
config.load(options)method is pivotal for interacting with these settings in scripts. - Understanding the configuration object and its parameters is critical for effective script development.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
What script types support the use of the N/config module?
What must be specified in the options parameter when using the `config.load(options)` method?
What happens if the 'type' argument is invalid or missing in the `config.load(options)` method?
Can the configuration record be loaded in dynamic mode using the N/config module?
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.
- Custom Tool Script Enhancements in NetSuite
Custom tool scripts in NetSuite gain execution log support and a new management page in February 16, 2026.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- 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.
