Debug logs for declarative automation
Key Takeaway
Set a trace flag on the user, have them repeat the problem, and read the debug log. For a Process Builder process, the debug level must include FINER events in the Workflow category.
A debug log is a record of what happened during a Salesforce transaction, including the automation that ran. To troubleshoot declarative automation, admins turn logging on with a trace flag, reproduce the problem, and then read the log. The log shows which automation ran, in what order, and why it did or did not fire.
What a debug log records
A debug log can record database changes, HTTP callouts and Apex errors. The log can also record automated workflow processes, such as workflow rules, assignment rules, approval processes, validation rules and processes.
Salesforce generates debug logs in these situations:
- A user-based trace flag is active.
- Apex tests run.
- Code or API requests include debugging parameters or headers.
The system creates a log for every transaction that matches the filter criteria. The transaction can come from the user interface, the API, web services, email services or executeanonymous calls.