Resolve Error: “An unexpected SuiteScript error has occurred.” while using Send Email Action of Workflows

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:

  1. Navigate to Customization > Workflow > Workflows
  2. Workflow: Click Edit
  3. Double-click the State that contains the Send Email action
  4. Click Send Email 
  5. Condition:
    • Use: Select Visual Builder
    • Workflow Condition Builder: 
      • Record: Select the record selected under the Record (Join Field) for both the Sender and the Recipient
        Note: When a Specific Sender or Recipient is set, the record type of the Sender or Recipient should be selected instead.
      • Field: Select E-mail
      • Compare Type: Select not Empty
      • Click Save
  6. Click Save 

Leave a comment

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