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
John SadlerJohn Sadler 

Flow: Open newly created Case record

I have a Flow that creates a Case from an Opportunity. I don't want it to return to the Opportunity but rather when the Flow finishes I want to see the Newly Created Case
Best Answer chosen by John Sadler

All Answers

Ajay K DubediAjay K Dubedi
Hi John,

You can achieve this in lightning component as well as in VF page. Below are the links with the example that may help you to get the required results.
1. For VF page:  https://developer.salesforce.com/forums/?id=906F000000097pVIAQ

2. For Lightning component: https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/components_using_flow_onfinish.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Khan AnasKhan Anas (Salesforce Developers) 
Hi John,

Greetings to you!

By default, when a flow finishes, a new interview starts and the user sees the first screen of the flow. To instead redirect the user to another page, build or install a local action that does so. Then add the action to your flow with a Core Action element. For example, a local action can open a record, list view, or URL or to show a toast message. Or it can use the Lightning Console JavaScript API to close a console tab.

Please refer to the below links which might help you further with the above requirement.

https://automationchampion.com/2019/04/16/getting-started-with-lightning-flow-designer-part-4-need-to-redirect-a-user-to-a-new-record/

https://help.salesforce.com/articleView?id=flow_concepts_finish_override.htm&type=5 (https://help.salesforce.com/articleView?id=flow_concepts_finish_override.htm&type=5)

https://success.salesforce.com/answers?id=9063A000000pc67QAA

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
umesh kantumesh kant
Great.! I Like this blog..!
the provided code realy helpful for my word. Thanks for sharing this info. same i feel

Thanks
Team Lecamel.Com
Wordpress Web Development Agency Losangeles CA USA (https://lecamel.com)
John SadlerJohn Sadler
Hi folks ... possibly should have mentioned, we are not using Lightning so if any solutions are Lightning based then that's a no go zone at the moment. Cheers John
Khan AnasKhan Anas (Salesforce Developers) 
This was selected as the best answer
John SadlerJohn Sadler
Thanks Khan ... I was hoping for a simple solution because I don't have time or the desire to play with Apex and VF pages:-(
John SadlerJohn Sadler
Hi again Khan ... any clue if a Test has been written for this?
Apex Class has to be created outside of our production environment and I can't get it into production if I don't have the test coverage of at least 75%