Modules
Objects/Functions
SuiteScript 2.0
{CurrentRecord}.setCurrentSublistValue({sublistId: {string*},fieldId: {string*},value: {number | Date | string | array | boolean*},ignoreFieldChange: {boolean},forceSyncSourcing: {boolean}})
N/currentRecord Module
CurrentRecord.setCurrentSublistValue()
Method Description:
Sets the value for the field in the currently selected line.
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:
currentRecord.CurrentRecord
Supported Script Types:
Client scripts
For more information, see SuiteScript 2.0 Client Script Type.
Governance:
None
Module:
N/currentRecord Module
Since:
2016.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=CurrentRecord.setCurrentSublistValue(options)
Example:
// Code Example 1
//Add additional code
//...
objRecord.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'item',
value: true,
ignoreFieldChange: true
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4637579473.html