Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

record.create(options)

{record}.create({type: {string*},isDynamic: {boolean},defaultValues: {Object}})

N/record Module
record.create()
Method Description: Creates a new record. For the promise version of this method, see record.create.promise(options). Note that promises are only supported in client scripts.
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.create(options)

Example:

// Code Example 1
// Add additional code.
//...

// Start the process of creating a sales order record.

var objRecord = record.create({
type: record.Type.SALES_ORDER,
isDynamic: true,
defaultValues: {
entity: 87
}
});

// Start the process of creating an instance of a custom record type.

var customRecord = record.create({
type: 'customrecord_feature',
isDynamic: true
});


// Get two default values
//...
record.create({
type: record.Type.SALES_ORDER,
defaultValues: {
entity: 107,
subsidiary: 1
}
})...
// Add additional code.

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