To activate the script during CSV import, it has been clarified that the checkbox RUN SERVER SUITESCRIPT AND TRIGGER WORKFLOWS must be checked for recognition.
When we check the option “RUN SERVER SUITESCRIPT AND TRIGGER WORKFLOWS” during a CSV import in NetSuite, the process typically follows these steps:
- Reading and Processing CSV Data:
- NetSuite reads the first line of the CSV file and utilizes the field mapping to determine whether to perform an ADD or UPDATE action for the specified record type.
- Executing User Event Scripts:
- NetSuite triggers User Event scripts associated with the corresponding record type.
- The User Event scripts may include functions such as beforeLoad, beforeSubmit, and afterSubmit, which execute at specific points during the ADD or UPDATE action.
- Completing Script Execution:
- After the User Event scripts have run their course for the current line, NetSuite moves on to the next line of the CSV file.
- Iterating Through CSV Data:
- The process repeats, iterating through each line of the CSV file, performing the defined actions, and executing associated scripts.
