Process builder fails to fires when sending email with attachment in Lightning experience.
Last updated 2022-02-10 ·Reference W-4740865 ·Reported By 21 users
Error sending emails with attachments from Case when in Lightning Experience.
Getting error while sending emails with attachments from a case record (Case record created from email to case functionality) in lightning due to a process builder written on email message object. The process builder is updating the fields on the email message object.
However the same functionality works fine
-when sending emails without attachments in lightning.
-After deactivating the process builder in lightning.
Reproducible only in LEX and working fine in salesforce classic
1) Create a new Email to Case and create an email using this email to case.
2) Create a process builder on email message object which is updating fields on email message object. The process builder triggers when we try to send email from salesforce
3) Once case is created in LEX, Go to the case record and then reply the email including the attachment using quick action Email
3) You will receive an error message, that says “The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301j0000000I9ay. Flow error messages: <b>An unhandled fault has occurred in this flow</b> An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.” on UI
4) The admin will also receive an error message on mail.
5) You can repro the same issue with any case record (even its not created from email to case) and from the Email Quick Action as well.
6) However this functionality works fine when you deactivate this process builder and try to send an email with attachment, the email will be successfully sent.
-Update the process builder to fire only for classic users using Userinfo.UItheme and handle the logic for lightning in the case trigger.
- Move the whole process builder logic to be handled by the trigger.
Reported By (21)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.