LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

Cancel button Vs Required Fields. FlowButtonBar component

Open mquinterocure opened this issue 4 years ago • 5 comments

Is there a way to configure button as a cancel and it doesn't ask or the required fields. I need a cancel button that works as a cancel without asking for the required filed in the screen flow. Thancks

Documentation issues

If your problem stems from wrong, outdated, or unclear documentation, please:

  1. Submit a link to the documentation here:
  2. Explain why it is wrong or unclear:
  3. Suggest any changes:

Support requests

We do not offer support for these components, and help requests will be closed.

mquinterocure avatar Dec 21 '21 16:12 mquinterocure

I have addressed this with the Navigation Button component by using one of the following methods:

  1. If not on the first screen, change the navigation to Previous
  2. Set the Cancel button to navigate to the url for the current record (this refreshes the page and restarts the flow)

ericrsmith35 avatar Dec 21 '21 16:12 ericrsmith35

Hi, thanks for your response but I don't understand the second option. Here how can I set the button as you proposed image

Here is my screen the idea is to try to create a record but with the option to cancel and navigate to a second screen to confirm de cancellation

image

Thanks for your help!!

mquinterocure avatar Dec 21 '21 19:12 mquinterocure

You can't navigate in the "Next" direction with empty required fields on the screen. I'm not sure if the FlowButtonBar offers a navigate to a url option for its buttons. Take a look at Navigation Button instead. https://unofficialsf.com/fsc-navigation-button/

ericrsmith35 avatar Dec 21 '21 20:12 ericrsmith35

Thanks for your answer!!!

mquinterocure avatar Dec 22 '21 15:12 mquinterocure

Hello, you can add a decision after the screen and check if the required value is not null + the value of the clicked button (without marking the field as required) . If it is null you return to the screen, else you continue your flow. You can put a variable to show an error message as well on the bottom of your input. You can put a cancel outcome on the decision without connect it. The flow will be closed. I wish that i helped!

mAhmedHassine avatar Feb 04 '22 17:02 mAhmedHassine