darrenhillconsulting
09/06/2024, 4:03 PMCeligo AI
09/06/2024, 4:04 PMAI generated answer (using internal Slack threads):To add a multiselect transaction field to a Suitelet form in SuiteScript 2.1, you would typically use the
addField
method of the serverWidget.Form
object. However, it's important to note that the MULTISELECT
field type is not supported by SuiteScript 2.0 Suitelets, and this limitation likely extends to SuiteScript 2.1 as well.
Here's a basic example of how you might add a field to a Suitelet form:
javascript
let form = serverWidget.createForm({
title: 'My Form'
});
let field = form.addField({
id: 'custpage_myfield',
type: serverWidget.FieldType.SELECT,
label: 'My Field'
});
In this example, a new form is created with the title 'My Form', and a new field is added to the form with the ID 'custpage_myfield', the type SELECT
, and the label 'My Field'.
However, since MULTISELECT
is not supported, you cannot directly create a multiselect field in this way. As a workaround, you might consider creating multiple SELECT
fields, or using a different field type that can accommodate multiple values.
******
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/06/2024, 4:04 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836389184
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836086
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832415164
Celigo AI
09/06/2024, 4:04 PM