Flows are often a great alternative to custom code. They can be used to provide custom UI, trigger handling, and even backend batch processing. As many Salesforce consultants will attest, though, error handling in flows is difficult. Errors in screen flows are often unsightly and don’t have flexible notification mechanisms. Writing to the debug log from a flow still requires custom code.
To help you address these issues, the latest release of the Apex BOOST library includes point-and-click logging capabilities as well as automatic error logging for flows! You’ll be able to log errors, notify stakeholders, and monitor the health of your flows with ease.
Logging From a Flow
Apex BOOST v1.5 includes a simple sub flow, Logger, that will create a log record with your custom information.
If you’d like finer-grained control, you can call the library’s invocable Apex method, Logger.log which is available as a flow action, Log. To create a log record, first populate a Log Event record with details.
Then invoke the Apex action, passing in your record.
Apex BOOST is a free library available on the Salesforce AppExchange. Download it today to start monitoring error logs and improve your custom code quality!
Automatic Exception Logging
In addition to the manual logging method described above, Apex BOOST v1.5 installs a triggered flow, “Flow Error Handler”, that creates a log record any time an unhandled fault occurs in one of your screen flows. This means that simply by installing v1.5, you’ll start getting error information which can be used to notify stakeholders and better understand the health of your system.