Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

record.load(options)

{record}.load({type: {string*},id: {number*},isDynamic: {boolean},defaultValues: {Object}})

N/record Module
record.load()
Method Description: Loads an existing record. For the promise version of this method, see record.load.promise(options). Note that promises are only supported in client scripts. Make sure to save the record before loading it.
Returns: record.Record
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: Transaction records: 10 units Custom records: 2 units All other records: 5 units
Module: N/record Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=record.load(options)

Example:

// Code Example 1
// 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.

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4267258486.html