Tiina Böös
09/10/2025, 11:46 AMCeligo AI
09/10/2025, 11:46 AMAI generated answer (using internal Slack threads):To get all values of a sublist column in SuiteScript, you can use the
getSublistValue
method. However, if you want to dynamically get all the column names from the sublist, there isn't a direct method available.
One way to achieve this is by using the request.parameters
object. Here is an example:
javascript
var columnNames = request.parameters.custpage_listfields.split('\\u0001');
This will give you an array of column names. You can then iterate over this array to get the values of each column for a specific line:
javascript
for (var i = 0; i < columnNames.length; i++) {
var value = request.getSublistValue({ group: 'sublistName', line: lineIndex, name: columnNames[i] });
// do something with the value
}
Another approach is to get the columns from the saved search again in POST.
In the client script, you can use the getMachine
method to get the sublist column ids:
javascript
var columnIds = getMachine('sublistId').getFormFieldNames();
Please note that these methods might not work in all scenarios and could be considered hacky.
******
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
09/10/2025, 11:46 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827514648
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822174072
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81463623
Celigo AI
09/10/2025, 11:46 AM