function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Russell LesterRussell Lester 

How do I apply multi-field, multi-object validation rules only prior to executing a flow?

I have a flow that generates an order from opportunity data. I would like for this flow to only kickoff if the opportunity data is deemed to contain all necessary components. These components exist on several objects: Account, Opportunity and Opportunity Product. I only want to execute the validation process at the point of user clicking on the Generate Order button as this confirms that they believe the opportunity has "complete" data to allow the order generation to continue. I don't want the validation process to run anytime an opportunity is edited as the user doesn't have all necessary information at one time to generate an order. What method can I use to apply a validation routine across multiple objects and fields before kicking off a flow?

debdubdebdub
Hi Russell -
You could set up a button to launch an interactive flow that would display the required items and let the user confirm them (or add additional information if missing).  The last step could be confirming and launching the order flow.
Deb
Russell LesterRussell Lester
Thanks for your reply, Deb. That is one approach I could take. I am also working through a potential solution that involves calling up an APEX class to sequence through the required fields and trigger an error message if any are missing.