record.load(options)
Method Description |
Loads an existing record. Note that the maximum number of lines on record’s sublist is limited to 10,000, see Limits for Display of Transaction Lists and Sublists
Note:
For the promise version of this method, see record.load.promise(options). Note that promises are only supported in client scripts. Make sure you save the record before loading it. |
Returns |
|
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
Transaction records: 10 units Custom records: 2 units All other records: 5 units |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The record type. Use the following guidelines:
|
2015.2 |
|
number |
required |
The internal ID of the existing record instance in NetSuite. The internal ID of the record is displayed on the list page for the record type. |
|
|
boolean |
optional |
Determines whether the record is loaded in dynamic mode.
By default, this value is
Note:
For additional information about standard and dynamic mode, see record.Record and SuiteScript 2.x Standard and Dynamic Modes. |
2015.2 |
|
Object |
optional |
Name-value pairs containing default values of fields in the new record. By default, this value is null. For a list of available record default values, see N/record Default Values in the NetSuite Help Center. |
|
Errors
Error Code |
Thrown If |
---|---|
|
A required argument is missing or undefined. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/record Module Script Samples.
// Add additional code
...
// Load a sales order
var objRecord = record.load({
type: record.Type.SALES_ORDER,
id: 157,
isDynamic: true,
});
// Load an instance of a custom record type with the ID customrecord_feature.
var newFeatureRecord = record.load({
type: 'customrecord_feature',
id: 1,
isDynamic: true
});
...
// Add additional code