How to update sublist data using client script in netsuite Suitescript 2.0

First select the line that you want to update using

var records = context.currentRecord;

var lineNum = records .selectLine({
sublistId: 'yoursublist_id',
  line: 0 // your line number
});

after selecting we can insert data using 

records.setCurrentSublistValue({
sublistId: 'yoursublist_id',
fieldId: 'yourfield_id',
value: true,
ignoreFieldChange: true
});

then commit line 

records.commitLine({
sublistId: 'custpage_sublist'
});

Comments

Popular posts from this blog

What are sales territory in Netsuite?

How to get and set a sublist in netsuite suitlet suitescript 2.0