alexed1 / LightningFlowComponents

A collection of unofficial Flow extensions that can be used to enhance Salesforce Flow and Orchestrator.
http://unofficialsf.com
Other
584 stars 574 forks source link

ShowToast - Prevent "YOUR FLOW FINISHED" screen #958

Open Garywoo opened 2 years ago

Garywoo commented 2 years ago

I have built a screenflow to be launched using an action button, which, under normal circumstances should simply complete an action, and then show the user a success toast message using the ShowToast action, without actually using any screen elements. If the flow encounters an error, this will be presented to the user with a screen element.

Currently, if no screen has been shown, and the flow finishes (with or without this ShowToast action) a screen with the message "YOUR FLOW FINISHED" will be shown to the user. There are no Next / Previous buttons on this screen, and the X button in the upper right must be used to close it. This is default Salesforce behaviour. The toast message is shown above this screen.

image

It would be great if this action (or another action) could prevent or suppress this "YOUR FLOW FINISHED" screen, so that no further interactions are required by my users running the flow, and the modal screenflow window closes as normal when using the ShowToast action as the last flow action.

Preventing this screen is a popular topic on the Salesforce Ideas board, as can be seen here: https://ideas.salesforce.com/s/idea/a0B8W00000GdeS5UAJ/prevent-your-flow-finished-in-screen-flows

ericrsmith35 commented 2 years ago

You could always move the button to a flow screen, thus avoiding the flow finished message.

Garywoo commented 2 years ago

@ericrsmith35 Having a success screen with a finish button is currently the workaround I'm using. 

Ideally, I don't want the user to see any screens at all if the flow completes successfully, only a toast. This would save the user a click and seeing a pointless screen. Screens are only required for error scenarios in this screenflow.

jdpond commented 2 years ago

+1 @tomSny and I have talked about doing this for another client too.

ericrsmith35 commented 2 years ago

There wouldn't be an extra click nor a pointless screen if the button was presented in the flow rather than on an action button.

On Wed, Nov 3, 2021 at 1:07 PM Gary Woodhouse @.***> wrote:

@ericrsmith35 https://github.com/ericrsmith35 Having a success screen with a finish button is currently the workaround I'm using.

Ideally, I don't want the user to see any screens at all if the flow completes successfully, only a toast. This would save the user a click and seeing a pointless screen. Screens are only required for error scenarios in this screenflow.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/958#issuecomment-959739222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX4OI7SUS4XOAEMNGUDUKFT3ZANCNFSM5HJLPYGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Garywoo commented 2 years ago

@ericrsmith35 I'm not sure I follow. My screenflow is launched using a custom action button on a quote record page layout. Are you suggesting launching the screenflow in a different way?

ericrsmith35 commented 2 years ago

Yes, it will change where the button is on the page. Add a screen as the first node in your flow, disable the footer, use the NavigationButton component from unofficialsf.com to display your button on the screen. Configure the button to just navigate to the next node in the flow. Add the flow to the page wherever you want the button to be. When the flow finishes and the toast message has displayed, the flow will automatically restart and continue to show the button.

On Wed, Nov 3, 2021 at 1:33 PM Gary Woodhouse @.***> wrote:

@ericrsmith35 https://github.com/ericrsmith35 I'm not sure I follow. My screenflow is launched using a custom action button on a quote record page layout. Are you suggesting launching the screenflow in a different way?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/958#issuecomment-959763124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX3JEB7YQHRGTEWCZSTUKFW45ANCNFSM5HJLPYGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Garywoo commented 2 years ago

In that case, the user would still have to interact with a screen. I'm trying to avoid that being a requirement here, and having a one-click process to run the flow and then have it close.

ericrsmith35 commented 2 years ago

There would be no changes in clicks by the user. The flow IS the button.

On Wed, Nov 3, 2021 at 2:11 PM Gary Woodhouse @.***> wrote:

In that case, the user would still have to interact with a screen. I'm trying to avoid that being a requirement here, and having a one-click process to run the flow and then have it close.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/958#issuecomment-959794719, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHXZYSRGP4FET3P5GUQ3UKF3NXANCNFSM5HJLPYGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Garywoo commented 2 years ago

Oh, are you suggesting embedding the flow on the lightning page as a component, and then running the action from that flow?

Hmm, that could work, however we have a standard operating procedure of launching these flows from record action buttons at the top of the page, and already have a number of other actions in that area. Switching things up for this one other action could be confusing for users, as they'd have to remember to look in two places for taking actions on the record.

I'd prefer to keep things standardised here, and just launch the flow using the regular action buttons. Is there any possibility of preventing or suppressing this finished screen in that situation?

ericrsmith35 commented 2 years ago

Not yet, but I voted for the idea.

On Wed, Nov 3, 2021 at 2:22 PM Gary Woodhouse @.***> wrote:

Oh, are you suggesting embedding the flow on the lightning page as a component, and then running the action from that flow?

Hmm, that could work, however we have a standard operating procedure of launching these flows from record action buttons at the top of the page, and already have a number of other actions in that area. Switching things up for this one other action could be confusing for users, as they'd have to remember to look in two places for taking actions on the record.

I'd prefer to keep things standardised here, and just launch the flow using the regular action buttons. Is there any possibility of preventing or suppressing this finished screen in that situation?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/958#issuecomment-959803474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHXYRC43VOW367UDUWDDUKF4W3ANCNFSM5HJLPYGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.