Skip to main content
We are not yet deploying flows to production as active.  However, as a "best practice" my team is self-imposing test classes for each flow. I have a simple flow:  When a User is deactivated, also set the related Contact record status__c to Inactive. Here's what I've tried so far:

 

1.  Record-triggered flow:  it works great, but I had to use a zero-hour scheduled path to get around the DML error.  My test class will not fire the flow.  I suspect it's the zero-hour path that's causing this, but I don't know how to get around it.

 

2.  Scheduled flow: This also works great.  I can define the criteria easily to find the User records and update the related Contact.  But how do you test a scheduled flow?  I could find no examples.

 

3.  Auto-launch flow:  It works great, modeled after the scheduled flow.  It's easy to test. But I want it to run on a schedule!  So now I have to write a flow controller and a schedulable class, right?

 

 I could have written a trigger and test class so much faster!  I would love to simply be able to test my record-triggered solution.  Any ideas or suggestions?
5 answers
0/9000