The workflow has been designed to send emails to the customer when picking, packing and shipping Item Fulfillment.
When an Item Fulfillment is created with a Shipped Status, the Error: “An unexpected SuiteScript error has occurred” occurs.
Note: The error is also encountered if the Status is updated to Shipped on the existing Item Fulfillments, on Save button click.
The error occurs because the Customer or Entity set on the Item Fulfillment does not have an Email Address.
Prerequisites:
- Send Email action condition: Status = Item Fulfillment:Shipped
- Recipient section
- Record (Join Field): Current Record Selected
- Field: Entity Selected
Solution
- On Customer record Add a value for Email
- Add an Email is not empty condition on the workflow
- Note: This will help to ensure that the action only triggers if the Customer has an email address.
Example:
- Set a static value for the Recipient in the Send Email action