config.load(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Method used to load a record.Record object that encapsulates the specified NetSuite configuration page.

After the configuration page loads, all preference names and IDs are available to get or set. For more information, see Preference Names and IDs.

You can use the following Record Object Members to get and set preference names and IDs:

Returns

record.Record

Supported Script Types

Server scripts

For additional information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/config Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.type

enum

required

The NetSuite configuration page you want to access. Use the config.Type enum to set the value.

2015.2

options.isDynamic

boolean

optional

Determines whether the record is loaded in dynamic mode.

  • If set to true, the record is loaded in dynamic mode.

  • If set to false, the record is loaded in standard mode.

For more information, see SuiteScript 2.x Standard and Dynamic Modes.

2015.2

Error Code

Message

Thrown If

INVALID_RCRD_TYPE

The record type {type} is invalid.

The type argument is invalid or missing.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/config Module Script Sample.

          //Add additional code 
...
var configRecObj = config.load({
    type: config.Type.COMPANY_INFORMATION
});
configRecObj.setText({
    fieldId: 'fiscalmonth', 
    text: 'July'
});
configRecObj.save();
...   
//Add additional code 

        

Related Topics

N/config Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices