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...


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. Apr 20 '15 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. Aug 24 '18 at 4:18
  • help.salesforce.com/… Jun 23 '21 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.