function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Varsha Pawar 4Varsha Pawar 4 

Saving and loading List of contacts in Flows

Hi All,

We have to build Screen based flow which has few screens. One the screen has First Name, Last Name, Gender, DOB, Education and a checkbox. If this checkbox is checked and we click on Next button, then we want to save the information in Contact object and show the same screen again to add another Contact record.This screen will appear till the checkbox is checked. Also, if we click on Prev/Next button then the contact data should be loaded as they were added.

If we cannot implement this functionality, then please suggest how should we do it. Any pointers would really help me. 

Thanks in advance.
ShirishaShirisha (Salesforce Developers) 
Hi Varsha,

Greetings!

I don't think this can be achieved by the flows as whenever we click on the Previous button then the page gets reloaded thus the entered data will be vanished as it is not committed to the database yet.

However,this might be possible by using the VF page by temporarily saving the data.Please check the sample code provided in the below doc:

https://www.salesforcetutorial.com/visualforce-page-add-multiple-records/

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Varsha Pawar 4Varsha Pawar 4
Hi, 

Thank for the reply!

I'm referring to this post (https://forcepanda.wordpress.com/2019/12/18/how-to-create-a-map-collection-in-flows-part-2flow-map-methods-spring20delight/) which has similar functionality that I want to work on. However, I'm unable to assign input variables.

Could you please help me?

Thanks!