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
daniel1110daniel1110 

How can I save my data and continue later?

Hi everyone,

 

I was wondering if anybody had this sort of requirement? Just like the popular online tax forms, how can I save the content in a form to resume work later?

 

I plan to have series of screens/forms to collect data over a course of weeks. I would imagine when the user signs off for the day, he/she would "save" and the next day, he/she would enter in the Id and be lead to the existing online form to resume from where he/she left off.

 

I wanted to build this with VF flow and can see how it can be done, but the problem is addressing partially complete scenarios and how to recover from where the user left off.

 

Ideally, a plug-in to VF would be amazing, but I am limited in my APEX skills.

 

Can anyone provide a suggestion or workaround?

 

Thank u!

 

Daniel

Best Answer chosen by Admin (Salesforce Developers) 
RajaramRajaram
You should not need to do APEX. But to get state in your process, you need flow to maintain the state. By that i mean the flow will update a field value along the process and you will need to pass in the status from the DB to set a flow variable and the flow will branch to the appropriate step in the flow.
This should just need FLow and simple VF page where you pass in the ID of he object and also the field value using <apex:param> tags.

All Answers

RajaramRajaram
You should not need to do APEX. But to get state in your process, you need flow to maintain the state. By that i mean the flow will update a field value along the process and you will need to pass in the status from the DB to set a flow variable and the flow will branch to the appropriate step in the flow.
This should just need FLow and simple VF page where you pass in the ID of he object and also the field value using <apex:param> tags.
This was selected as the best answer
marifmarif

Hi Rajaram,

 

I have just started my first flow in Salesforce...

 

Flow Screen 1:

 

Gender: Male or Female - User selects Male and goes to next screen

Create the record and save the Gender selection on the custom object. As you recommend I will have another on field on my custom object to save flow_status__c as Screen1 complete.

 

Flow Screen 2:

 

Name: Empty - User leaves/closes the flow screen without going next.

 

Questions:

 

Next time when the user comes in later clicks the edit on above particular record on the custom object's tab. 

 

As per your recommendation, I will pass the ID on to the Visual force page.

 

Pass the parameter (as Screen1 complete) to the flow. Am I right below?  or please correct me

 

<flow:interview name="Violation_CCMS_Flow" finishLocation="{!URLFOR('/apex/ViolationFlow')}">
<apex:param assignTo="FLOW Variable?" value="{!Violation__c.flow_status__c}" />
</flow:interview>

 How can I check incomming variable or What should I do on the FLOW to land the user directly on the Flow Screen 2?

 

Please let me know the posibility....

 

Also, Please let me know if the above is confusing...

 

Youtube tutorial will really help!!!

 

Thank you and would really appreciate any help on this.

 

 

marifmarif

Just got it figured out!

 

That was my learning curve.

 

I could accomplish it by passing the flow variable

 

<flow:interview id="ViolationFlow" name="Violation_Flow" finishLocation="/{!$ObjectType.Violation__c.KeyPrefix}" >
<apex:param name="FlowScreenStatus" value="{!Violation__c.Flow_Screen_Status__c}" />
</flow:interview>

 

And had desicion element at the top (set as start) that would read the "FlowScreenStatus" flow variable and the land user to the appropriate flow screen according to the Flow_Screen_Status__c field on the custom object.

 

Flow is a very good feature and works perfect for me!!!

 

Still need to have buttons and link elements on the flow for opening windows (using javascript). For now I can do that from the visual force page where I have flow.

 

Thanks

 

Anthony SkinnerAnthony Skinner

Love seeing that you figured this by yourself, Marif. Is there a more modern approach with the new way flows are setup with Lightning? We are trying to pick up workflows that may be paused for up to a week or so. 

Do you have to do this in Apex? Or can you just do this with standard Lightning Flow components?