When you create a screen flow with input fields on Screen 1 and assign a variable based on those inputs, navigating to Screen 2 and then clicking the Previous button to return to Screen 1 causes the variable to lose the value that was assigned on Screen 1. The input fields on the screen may still visually retain their values, but the underlying variable value is reset.
Second scenario: If you save values from Screen 1 into a variable and perform a database operation — such as inserting or updating a record using a Create Records or Update Records element — and then display Screen 2 with the resulting record values, clicking Previous causes the variable that was assigned values from Screen 1 to become NULL. This can cause problems if a decision element later checks whether the record was already created or updated during the forward pass, since the variable no longer holds that indicator value after navigating backward.
This screen flow behavior is working as designed by Salesforce. When a user navigates to a previous screen, the Salesforce Flow engine resets variable values assigned during that portion of the flow. This is an intentional behavior to maintain flow state consistency.
To avoid this issue, use one of the following workarounds:
Workaround 1: Disable backward navigation and design a forward-only loop. Disable navigation to the previous screen and design the flow to loop back to the first screen based on required conditions using a separate screen or decision element. Because the flow never navigates backward — it redirects forward to the appropriate screen — the value of the variable is preserved throughout. This is the recommended approach when backward navigation is not a business requirement.
Workaround 2: Delay database operations until the final screen confirmation. Hold the value of all variables and avoid performing database operations (such as creating or updating records using the Create Records or Update Records element) until the user confirms on the last screen. This prevents the situation where navigating backward results in duplicate records being created, since the database write has not yet occurred.
Workaround 3: Use the Get Records element to detect and reassign an existing record. Use the Get Records element to retrieve a record that may already have been created, and reassign its field values to the same variable before the decision element. This allows the decision element to detect that the record was already created and skip the creation step when the user moves forward again after having navigated backward.
000380596

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.