Script To Update Multi-Select Field on Save
Published on
November 30, 2023 at 7:43:02 AM PST November 30, 2023 at 7:43:02 AM PSTth, November 30, 2023 at 7:43:02 AM PST
Scenario
The article applies to a very specific scenario, but it also demonstrates how to useSuiteScriptto set values on Multi-Select Fields in NetSuite.
The following solution applies to a Scenario where on the Support Case Record it would be necessary to track down on a single field all the employees to whom the same Case has been escalated. As a new Employee is added to the Subtab Escalations > Sublist Escalated To upon saving the record the new Escalatee will be added to the Multi-Select Field that keeps track of all Employees.
Solution
Before achieving the mentioned goal viaSuiteScript, firstly is necessary to create a Custom Multi-Select Field:
- Navigate toCustomization>List, Records & Fields>CRM Fields
- ClickNew
- Label the fieldEscalatees List
- Set your own fieldCustom ID
- Set theTypetoMultiple Select
- SetList/RecordtoEmployee
- On theApplies Tosubtab checkCase
- ClickSave