Modules
Objects/Functions
SuiteScript 2.0
{record}.copy({type: {string*},id: {number*},isDynamic: {boolean},defaultValues: {Object}})
N/record Module
record.copy()
Method Description:
Creates a new record by copying an existing record in NetSuite.
For the promise version of this method, see record.copy.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.copy(options)
Example:
// Code Example 1
// Add additional code.
//...
var objRecord = record.copy({
type: record.Type.SALES_ORDER,
id: 157,
isDynamic: true,
defaultValues: {
entity: 107
}
});
//...
// Add additional code.
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4267258260.html