Rob
03/28/2025, 9:52 PMCeligo AI
03/28/2025, 9:53 PMAI generated answer (using internal Slack threads):To add a column to a sublist in a transaction using SuiteScript, you can use the
addField
method on the sublist object. Here is an example of how you can do this:
javascript
var form = scriptContext.form;
var sublist = form.getSublist({
id: 'your_sublist_id'
});
sublist.addField({
id : 'custpage_your_field_id',
type : serverWidget.FieldType.TEXT,
label : 'Your Field Label'
});
In this example, replace 'your_sublist_id'
with the ID of your sublist, 'custpage_your_field_id'
with the ID of your new field (it must be prefixed with 'custpage_'), and 'Your Field Label'
with the label you want to display for the field.
Please note that not all types of sublists support SuiteScript. For example, static list type sublists do not support SuiteScript. If your sublist is a static list type, you may need to create a new instance of the sublist using record.create({ type: 'your_list_type' })
.
******
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
03/28/2025, 9:53 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815133393
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814790428
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813597739
Celigo AI
03/28/2025, 9:53 PM