Modules
Objects/Functions
SuiteScript 2.0
{Record}.setSublistValue({sublistId: {string*},fieldId: {string*},line: {number*},value: {number | Date | string | array | boolean*}})
N/record Module
Record.setSublistValue()
Method Description:
Sets the value of a sublist field. (standard mode only — see SuiteScript 2.0 – Standard and Dynamic Modes)
When working in dynamic mode, set a sublist field value using the following methods:
Record.selectLine(options)
Record.setCurrentSublistValue(options)
Record.commitLine(options)
When you edit a sublist line with SuiteScript, it triggers an internal validation of the sublist line. If the line validation fails, the script also fails. For example, if your script edits a closed catch up period, the validation fails and prevents SuiteScript from editing the closed catch up period.
Sets a numeric value for rate and ratehighprecision fields.
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.setSublistValue(options)
Example:
// Code Example 1
// Add additional code.
//...
objRecord.setSublistValue({
sublistId: 'item',
fieldId: 'item',
line: 3,
value: true
});
//...
// Add additional code.
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4273166777.html