Scenario
If the error An unexpected SuiteScript error has occurred. is encountered when saving a record that has a workflow running on it, check the workflow for any Send Email action.
When adding a Send Email action on a workflow, there should always be a condition to check for both sender's and recipient's email address availability.
Solution
-
Navigate to Customization > Workflow > Workflows > Edit existing Workflow
-
Click on the State that contains the Send Email workflow action
-
Click the Send Email action
- Under the Condition section, click on the Open cross-link
- Configure the Workflow Condition depending on which record field contains the email address. For example:
Record
Field
Compare Type
Owner E-mail not empty -
Click Save
Note: Do this for all Send Email actions on the workflow.