7

Love the new Summer '20 release features for flow, excited to use Flows in place of Process Builder. One consideration I wanted to verify with the community. Is there a way or a best practice for debugging your flow for the "Record-Trigger" flow type? The $Record variable is used throughout but when you use the typical debug feature there is no way to insert a record id. I would prefer this so that I can develop the flow with the typical/helpful flow debugger.

At this point the only way I can think of is to activate the flow and test by manually triggering a record. This gives very little visibility and every adjustment requires a new version which isn't ideal. Any thoughts?

UPDATE/NOTE: It appears that although Record-Trigger Flows is a great idea, it may be missing a couple features in order to make it practical. For example, as a "Triggered" event, similar to good Trigger handling best practices, it should likely ONLY manage the event and call an autolaunch flow to actually handle the business logic/process. Unfortunately subflows are not accessible at this time

1

I put an intentional fault (like creating a record without a required field) into the flow as the last step while I'm developing so that when I activate and trigger the flow with record update, it will send the full flow debug log to my email.

Once all is looking well I remove the fault and activate working version. Unfortunately using debug logs in dev console just don't show enough information and this will send lots of emails potentially but it's the best I can come up with for now!

1

What I did (in my sandbox) was set up a trace flag for a user (me) to create a debug log (Setup -> Environments -> Logs -> Debug Logs). I also set the Debug Level for Workflow to Finer (Info wasn't very helpful). Then when I changed a record to trigger the process, I could read the debug logs in Setup.

0

At the moment, I'm triggering my flows with a process builder automation (auto launched flow), then I switch it over to Record-Trigger once it's working. If there is a better process I would like to hear.

  • How are you switching the flow type? The type can't be changed in the flow's properties. Are you re-creating the flow from scratch once you're done testing? – Garywoo Sep 24 '20 at 20:42
0

I know I'm late, but you do this by choosing to save it as a new flow. I do this as well as it's the only way to test it. The annoyance is that all $Record values have to be reassigned.

Otherwise you should build it in a sandbox where you can muck it up as much as you want, then deploy it when you determine it's working properly.

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.