In Suite Commerce Advanced (SCA), I'm trying to ad...
# ask-stanley-ai
m
In Suite Commerce Advanced (SCA), I'm trying to add a new field in the Addres form. The field already exist in Netsuite, custrecord_test. It is a checkbox but I want to display it in the form as a radio button with yes/no options. In my custom extension, I have added this field to the bindings array in the AddressEditView. I have also added the validation in the Addres.Model to be required. However, it is always no required.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can create radio buttons in NetSuite using the
N/ui/ServerWidget
module in SuiteScript. Here is an example of how you can do it:
Copy code
javascript
form.addField({
    id: 'id',
    name: 'rb',
    type: serverWidget.FieldType.RADIO,
    label: 'rb',
    source: 'rb'
});
However, to make the radio button useful, you might need to add some additional logic on top of the field display. As for creating a custom field (list/record) from the customer address book to use on a project record, you can use the
Form.addField
method in a user event script. You can then add your own select options using the
Field.insertSelectOption
method in a client script. For creating an Address field on a sales order similar to the Ship To Address field, the conversations suggest using a custom text field. However, this might not be the most efficient solution as it does not provide the same functionality as a complete address field. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832019567
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826093614
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823115826
Please provide your feedback on this answer.