Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

Record.insertLine(options)

{Record}.insertLine({sublistId: {string*},line: {number*},ignoreRecalc: {boolean},beforeLineInstanceId: {string*}})

N/record Module
Record.insertLine()
Method Description: Inserts a sublist line. When you insert a line with this method, all succeeding lines are moved and the total line count is increased. Essentially, succeeding lines are committed to a new sublist line with a new line number. (dynamic and standard mode — see SuiteScript 2.0 – Standard and Dynamic Modes)
Returns: record.Record
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/record Module
Sibling Object Members: Record Object Members
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Record.insertLine(options)

Example:

// Code Example 1
// Add additional code.
//...
objRecord.insertLine({
sublistId: 'attendee',
line: 2,
});
objRecord.setCurrentSublistValue({
sublistId: 'attendee',
fieldId: 'attendee',
value: 838
});
objRecord.commitLine({
sublistId: 'attendee'
});
//...
// Add additional code.

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