9

The title says it all. We have flows where we'd like to provide an option to cancel the flow completely on some earlier screens. In the flow I'm working on now, there's just one screen in the flow where the user could logically cancel, because clicking "next" results in data being permanently saved, with a second screen that confirms the new data.

Of course, you can just navigate away from the page, but we'd like a more explicit cancel action, so that the buttons on the right would read [Next] [Cancel] instead of just [Next] or [Next] [Pause]. I'm certain I can do this with normal JavaScript, but I'm trying to avoid any code. I've already taken a glance around here and the top pages on Google without much luck.

2 Answers 2

1

There are public extensions available now that allow more declarative approaches:

https://unofficialsf.com/advanced-flow-navigation-button-from-gravitylab/

https://unofficialsf.com/custom-footer-button/

https://unofficialsf.com/fsc-navigation-button/

3

I know you've said you don't want to code, but I also know you're a very good coder. So, I'd recommend you add a method to your flow controller that Supports a Cancel button. Every Flow Controller always has (or has the option) to provide a redirect at the end of the flow using a method like below:

public PageReference getOID(){
    PageReference p = new PageReference('/p/opp/SelectSearch?addTo=' + getOppID() + '&retURL=%2F' + getOppID();
    p.setRedirect(true);
  return p;
}

Why not create a similar method to call from your Cancel button where p.setRedirect(false)? Whether you choose to call it using JS Remoting or standard VF would be up to you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .