Perry Auld
07/10/2025, 7:45 PMCeligo AI
07/10/2025, 7:45 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you can add a hyperlink to a sublist in SuiteScript by using the URL field type. Here's how you can do it: 1. When you define your sublist field, set the field type to URL. This can be done using the
addField
method on the sublist object. For example:
javascript
var sublistField = sublist.addField({
id: 'myfield',
type: serverWidget.FieldType.URL,
label: 'My Field'
});
2. After defining the field, you can set the link text using the linkText
property. This will be the text that is displayed for the hyperlink. For example:
javascript
sublistField.linkText = 'Click me';
3. When you insert rows into the sublist, you can set the URL for each row using the setCurrentSublistValue
method on the CurrentRecord
object. For example:
javascript
currentRecord.selectNewLine({ sublistId: 'mysublist' });
currentRecord.setCurrentSublistValue({ sublistId: 'mysublist', fieldId: 'myfield', value: '<http://www.example.com>' });
currentRecord.commitLine({ sublistId: 'mysublist' });
In this example, 'http://www.example.com' would be the URL that the hyperlink points to.
Please note that the link text will be the same for all rows in the sublist, as it is set when the field is defined. However, the URL can be different for each row, as it is set when the row is inserted.
******
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
07/10/2025, 7:46 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843154609
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840455294
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835294664
Celigo AI
07/10/2025, 7:46 PM