+ Start a Discussion
djinatlgadjinatlga 

Flow in VF page with a File Upload function. How to prevent flow fields clearing on file submission?

I have a VF page with a Flow in it. On the page are some fields in the flow as well as a file attachment field in the VF page below the flow. In this step of the flow, the user will tend to fill out the fields in the flow then go to the bottom of the page and upload an attachment. When they upload the file it refreshes the entire page and clears out the values in the flow fields before the can click the "next" button in the flow to advance to the next screen an record their inputs into the database. What options are their to prevent this? I prefer not to create a separate screen just for the file upload or split the flow up into multiple flows. 

 

There is a restriction so you can't do a partial refresh on only the attachment section "apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute"