Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

record.Record

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=record.Record for more information.

N/record Module
record.Record
Object Description: Encapsulates a NetSuite record. There are two modes you can operate in when you create, copy, load, or transform a record with SuiteScript 2.0: standard mode and dynamic mode. When a SuiteScript 2.0 script creates, copies, loads, or transforms a record in standard mode, the record’s body fields and sublist line items are not sourced, calculated, and validated until the record is saved (submitted) with Record.save(options). When you work with a record in standard mode, you do not need to set values in any particular order. After submitting the record, NetSuite processes the record’s body fields and sublist line items in the correct order, regardless of the organization of your script. When a SuiteScript 2.0 script creates, copies, loads, or transforms a record in dynamic mode, the record’s body fields and sublist line items are sourced, calculated, and validated in real-time. A record in dynamic mode emulates the behavior of a record in the UI. When you work with a record in dynamic mode, it is important that you set values in the same order you would within the UI. If you fail to do this, your results may not be accurate. The record.create(options), record.copy(options), record.load(options), and record.transform(options) methods work in standard mode by default. If you want these methods to work in dynamic mode, you must pass in a specific argument. See the help topic for the applicable method for more information. Use record.Type enum for multiple records. For help finding a record’s internal ID, see How do I find a record's internal ID? For more information about standard and dynamic modes, see SuiteScript 2.0 – Standard and Dynamic Modes For a complete list of this object’s methods and properties, see Record Object Members.
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/record Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=record.Record

Example:

// Code Example 1
// Add additional code.
//...
var objRecord = record.load({
type: record.Type.SALES_ORDER,
id: '6',
isDynamic: true
});
//...
// Add additional code.

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