Rob
10/18/2024, 2:59 PMCeligo AI
10/18/2024, 3:00 PMAI generated answer (using internal Slack threads):To update the sublist of a suitelet from an assigned client script, you can use the
currentRecord
object to get the current record, select the line you want to update using selectLine
, set the new value using setCurrentSublistValue
, and then commit the changes using commitLine
. Here is a sample code snippet:
javascript
var myRecord = currentRecord.get();
myRecord.selectLine({
sublistId: 'sublist_2',
line: 0
});
myRecord.setCurrentSublistValue({
sublistId: 'sublist_2',
fieldId: 'fee_item',
value: 100,
ignoreFieldChange: true
});
myRecord.commitLine({
sublistId: 'sublist_2'
});
In this example, 'sublist_2' is the ID of the sublist, 'fee_item' is the ID of the field you want to update, and 100 is the new value you want to set.
Please note that the sublist ID and field ID should be correct. If they are associated with a sublist, they should not start with 'custpage'. If they are fields on the main suitelet page, they should start with 'custpage'.
Also, make sure that the field you want to update is editable. You can follow the directions in the NetSuite Help Center for making the field editable.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/18/2024, 3:00 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.876169622
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.872563899
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.867763817
Celigo AI
10/18/2024, 3:00 PM