I have a trigger on EmailMessage that is looking at newly inserted emails sent for Email2Case, and parsing the text for certain trigger words and updating the case if found. This has been working, and in the past I have been able to capture debug logs. I believe I set a log on "Automated Processes" in the past.
Today we've added new criteria (via Custom Metadata). The trigger continues to work for the old criteria, but fails (and prevents case creation) for the new criteria. I attempted to obtain debug logs to determine the cause, but have not been able to do so. I have tried the following:
- Debug Log of type "Automated Processes"
- Debug Log of type "User" on Sys Admin user who set up Email2Case
- Debug Log of type "Trigger" on the trigger in question.
- Checked W20 known issues for debug log issues (running in W20 sandbox)
As noted above, the trigger does work for some inputs, so I know it is running, but I cannot capture any debug logs. How can I capture a log on this trigger when an Email2Case email inserts an EmailMessage?