You need to sign in to do that
Don't have an account?
Jonathan Spink
How do I get a VF page to autorun without user input?
We have a merge process that takes the user through several pages by them clicking 'Save' each time. How can I get this to run without requiring any user input?
Thanks for adding more input to the concern.
That doesn't seem to be valid use case, since if you try to autosave the populated or filled fields everytime when typed then it would make multiple callouts to database and save the details.
There should always be a mechanism, which lets the user to add the details as they want and upon filling the complete details, then only should make an attempt to reach to database and save.So, save button should be clicked as consent from user, everytime when need to save it to database.
If you want single button for all the fields filled in last screens or last VF pages then using flow with screen elements would be a good choice which shows interactice experience while saving multi page details or forms.
Check out how you can use flow builder to make this possible:
https://trailhead.salesforce.com/en/content/learn/modules/flow-builder/flow-builder-screens
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
All Answers
As per the description, it looks like you want to pre-populate the details in your VF page and just click 'save' button to merge the data and which would run without requiring any user input.
Here are few threads sharing examples by community members:
https://developer.salesforce.com/forums/?id=9060G0000005kJeQAI
https://developer.salesforce.com/forums/?id=906F0000000BLy5IAG
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
Thanks for adding more input to the concern.
That doesn't seem to be valid use case, since if you try to autosave the populated or filled fields everytime when typed then it would make multiple callouts to database and save the details.
There should always be a mechanism, which lets the user to add the details as they want and upon filling the complete details, then only should make an attempt to reach to database and save.So, save button should be clicked as consent from user, everytime when need to save it to database.
If you want single button for all the fields filled in last screens or last VF pages then using flow with screen elements would be a good choice which shows interactice experience while saving multi page details or forms.
Check out how you can use flow builder to make this possible:
https://trailhead.salesforce.com/en/content/learn/modules/flow-builder/flow-builder-screens
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.