Resolve the error “An unexpected SuiteScript error has occurred.” while working with workflow.

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:

Click Save
Note: Do this for all Send Email actions on the workflow.

Leave a comment

Your email address will not be published. Required fields are marked *