I have created a Visual Work Flow which creates a contact and opportunity record by clicking next button in the 1st screen. I am storing the created contact and opportunity in two different flow variable. Clicking the Next button will take the user to the next screen. In the next screen, if the user clicks previous button and again clicking next the flow automatically creating new records for contact and opportunity. I checked the already created flow variable values with a decision palette in flow, but I am keep getting null for this variable.

Is this a bug from Salesforce side? Or what am I missing? Please help me guys...

2 Answers 2


After doing a lot of research, I made a conclusion that its is not possible to store the variable data on clicking previous button in floe. So for getting the variable value , we should look-up that record we created before clicking the next button so that no new record will get created.

  • 1
    Just for clarification; this is correct. While created records stay created after pressing 'previous', it is by design that variables and assignments lose their value when going backwards in a flow. This is to provide the much-needed functionality of actually re-filling the variables when a mistake is made. You don't want to end up with wrong data when making a mistake in a potentially complex flow. Commented Apr 20, 2015 at 6:59
  • Is there any official Doc by Salesforce mentioning that we can not retain the variable values if be navigate back to the previous screen. Commented Aug 24, 2018 at 4:18
  • help.salesforce.com/… Commented Jun 23, 2021 at 11:38

Workaround over this limitation is shared in this article. Flow variable values retained navigating to the previous screen

  • 1
    Welcome to Salesforce SE! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – identigral
    Commented Jun 7, 2022 at 15:51
  • 1
    Welcome to Salesforce Stack Exchange (SFSE)! Link-only answers are discouraged and may be deleted. (See: Why and how are some answers deleted?) Please edit your answer to add more information. (From How do I write a good answer?: "...please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link....")
    – Moonpie
    Commented Jun 7, 2022 at 16:07

You must log in to answer this question.

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