Christiaan
11/22/2024, 3:56 PMCeligo AI
11/22/2024, 3:56 PMAI generated answer (using internal Slack threads):In NetSuite, the cases list in SuiteCommerce is not filtered by default. However, you can set up territories and exclude workflows and scripts from running on those territories to manage visibility. If you want to have unique lists per relation per website, you might need to use SuiteScript to customize the filtering. You can create a custom field in the address form and link it to another address book record. Then, you can filter the choices for this field so that the user can only see the addresses for the linked entity. Here is a sample code snippet that was shared in the conversation:
javascript
// SuiteScript 2.0 sample code for filtering a dropdown field
var field = form.addField({
id: 'custpage_field',
type: serverWidget.FieldType.SELECT,
label: 'Field Label',
source: 'customrecord_custom_record'
});
field.addSelectOption({
value: '',
text: ''
});
var searchResult = customRecordSearch.run().getRange({
start: 0,
end: 1000
});
for (var i = 0; i < searchResult.length; i++) {
field.addSelectOption({
value: searchResult[i].getValue({
name: 'internalid'
}),
text: searchResult[i].getValue({
name: 'name'
})
});
}
This script creates a dropdown field and populates it with options based on a custom record search. You can modify this script to suit your needs.
******
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
11/22/2024, 3:57 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.795752883
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.794314206
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.793357611
Celigo AI
11/22/2024, 3:57 PM