2

I'm having an issue in my org where I can't make anyone receive the unhandled exception apex emails, so i'm having a test failing on a Process Builder, and I can't fix the issue since I can't receive the email.

What I've tried so far:

  • My user has Receive Apex exception emails user permission.

  • Org deliverability email is at All Emails.

  • Tried both process automation settings Send Process or flow Email to options(when I marked User who last modified the flow obviously I ensured I was the user who lastly modified the process)

  • Adding my user and email to apex eception list mailing. Tried a personal email aswell.

  • Ran the email logs, 0 mails left to my expected addresses so they never left the platform.

  • Take a look at similar questions on SE, some of them were similar but not quite the same and none of the answers I saw there helped me solve the problem.

  • Delivery test with full success receiving all test emails.

Is there some permission or something I might be missing?

  • 1
    Whitelist Salesforce IP Addresses help.salesforce.com/articleView?id=000212386&type=1 – sfdc Dec 27 '18 at 14:55
  • 1
    Who ever has created the Flow, would get email. – Narendra Nimmana Dec 27 '18 at 14:55
  • Is this in a sandbox? Have you enabled all email delivery? Is your user account's email address correct? – sfdcfox Dec 27 '18 at 15:18
  • Deliverability test are working fine, shouldn't it mean that I don't need to whitelist them? I think it depended on the User who last modified it by def and then you can modify that behaviour since Summer'18 on Process automation settings. This is a Sandbox, correct, All email deliveribablity is enabled and my user email is correct 100% since I received confirmation emails successfully. – Alexander Aeons Torn Dec 27 '18 at 15:38
  • 1
    so i'm having a test failing on a Process Builder, - you mean a testmethod is failing? There will be no email sent in testmethods – cropredy Dec 28 '18 at 2:34
2

Based on the comments, If you verified that you're the last modifed person and Apex Exception Notification is configured, with all email delivery along with IP adresses this might be a bug due to suppression of apex exception emails and you need to raise a case with salesforce as I have encountered similar experience in the past.

Reference: Not Receiving Unhandled Exceptions Emails

| improve this answer | |
1

Given that you have assured yourself:

  • Your email is registered in Setup | Apex Exception Email
  • Email deliverability has been verified
  • Examining the debug log has not yielded any additional knowledge or insight

Then you need to isolate the issue using selective reduction techniques:

  • Remove the PB altogether and see if the error disappears
  • Start with a basic PB with the minimal decision criteria and action block and retest
  • Repeat above by adding back more decision block(s) and criteria; adding back more action blocks

Note that PBs:

  • Can call flows that in turn fail (check flows for unhandled faults)
  • Can call invocable Apex that can fail
  • Can do CRUD that in turn causes other PBs and triggers to execute (this should be apparent in the debug log)
  • Can throw exceptions, typically because the value of a lookup field is null due to data or sharing issues
| improve this answer | |
0

One question to consider is whether you are failing to receive flow exception emails for ALL process builders or if the exception emails are just failing for one particular process builder.

I just had a process builder fail. I received an error message in the UI that read:

"We can't save this record because the (Object__c) process failed. Give your Salesforce admin these details."

There were no details, and though I recreated the error, checked deliverability in my sandbox, made sure I was on the Apex Exception Email list, etc., I received no exception email.

I intentionally created an error for a different object, however, and received the flow exception email like I always do.

I just realized that for the object whose process builder is failing, I just changed a lookup relationship to a master/detail relationship, and this particular process builder (built by someone else on my team) has tons of references to the record owner ... Record owners don't exist on this object anymore, since it's now the child in a master/detail relationship:

Can I feel safe to change a lookup relationship field into master-detail relationship if it is required and cascade deletion

I don't know why an exception email can't be generated in this scenario, but this appears to be my problem. I discovered it when I attempted to clone the process builder with the recent relationship change. Again, other process builders seem to be generating exception emails without issues.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.