Apex Aide apexaide

A Better Way to Debug a Screen Flow

By Eric Smith· ericsplayground.wordpress.com· ·Intermediate ·Admin ·2 min read
Summary

This solution offers a streamlined way to debug screen flows by mimicking the intuitive UI of record-triggered flow debugging. It introduces a subflow that triggers a controlled error, sending an email with a direct link to a flow debug session showing the exact path taken. This approach eliminates the need to scroll through lengthy flow debug logs, enabling Salesforce professionals to pinpoint issues easily within screen flows. Implementing this can dramatically improve troubleshooting efficiency in your org’s screen flows.

Takeaways
  • Insert the Debug-Force-Flow-Error subflow to trigger a custom error for debugging.
  • Create a boolean variable vDebug to toggle debugging on or off in screen flows.
  • Use the error email link to open the flow in debug mode with a clear path outline.
  • Ensure the screen flow is Active and uses Auto-Layout mode for compatibility.
  • Move the error node within the flow to test different debugging scenarios.

Have you ever wished you could debug a screen flow using the same UI that you have when you are debugging a triggered flow? Record Triggered Flow Debugger You get to see the path taken through the flow and you can chose to expose or hide the details behind each of the executed nodes in the flow. This is much easier then what you get with a screen flow, which is an almost endless run-on list of everything that happened in the flow. Screen Flow Debugger When debugging a screen flow, you are constantly having to scroll and search trying to find the exact information you need to debug your flow. Wouldn’t something like this make debugging a screen flow much easier? Screen Flow Debugging Improved I’ve created a special subflow you can install in your orgs and use in your screen flows to give you this improved debugging experience. You simply insert this subflow into your screen flow where you want it to stop.

Flow BuilderUncategorized