In this post, we will talk about a workaround for one of the Salesforce Tips To Retain Flow Variable Values To Previous Screen. which is here, in the resolution you can refer to the first point shared in the above article.
I will try to illustrate precisely, so please scan that point before you proceed further.
You can solve this limitation using a screen flow where you will be designing two subsequent screens.
Assignment Element is used to satisfy the requirement.
A Lightning web component is primarily used for navigating between the screen.
The Screen Flow footer is disabled.
The navigation buttons provided by the Lightning web component track the back button click event.
Review the Advance option used for the back button variable. (varBackClicked).
The attached screenshot will provide you with a fair understanding of the implementation.
For raw code , go to the git repo here
Imposing the assignment element between screens helps in retaining the values whereas the back button present in the lightning web component tracks the navigation.
Salesforce Tips To Retain Flow Variable Values To Previous Screen, I Hope you find this post useful! Catch you in the next content.
And thank you for being an awesome reader.
Share and grow together !!
If you have any doubts you can comment down below, I will try to reply ASAP.
Also keep visiting us, for more such content!