Hey fellow trailblazers!
I'm reviewing some updates to a screen flow that runs when a button is clicked. The only updates have been to remove the 2 screens. The flow now launches from a button on the Contract page, as it did previously and when it finishes it redirects the user to a brand new Quote (created by the flow) using an Apex Action, as it did previously. The only difference is that the end user was presented with 2 screens during which they had to select a record and add some details. This is now automated by the flow and the user doesn't see any screens.
My question, can this flow still be a screen flow? Should this flow now be updated or rebuilt so that it's an Auto-launched flow? Could an Auto-launched flow still be run via a button on a Lightning Record page (and receive the RecordId)?
I also don't know at this stage if we'll want to add screens to the flow at some point in the future, in which case presumably it could be left as a screen flow.
I think I've heard of screen flows without screens called 'Invisible Screen Flows' - is this a thing?
I just want to make sure I'm following best practice and so far I haven't found any clear recommendations or documentation on this.
Thanks so much for any advice you can give everybody.
Best wishes,
Matt
Yes you can have a screen flow without screens but it is not necessarily an ideal situation for users because they are not necessarily aware of what is happening once the button is clicked.
Personally, I find in circumstances like this that I usually opt for one of 2 options:
- Confirmation screen prior to redirect to let the user know things went smoothly and will be redirected as soon as they click Next / Confirm / etc...
- A confirmation screen to have the user vet the data before the action is executed. This is more a combination data review and confirmation screen to just make sure things went according to plan before proceeding.
To your specific question, yes an Autolaunched flow can be called from a button. There is a trailhead module on this specific item that can be found here. If you wanted to convert to an auto-launched flow you would simply need to remove your screens and then save as a new flow. Unfortunately today you cannot save as new version if it's switching flow types.