I have a VF Page where we have Next buttons that are taking the user to the next page , and the last page contains Save which will insert the Account.But the problem is as soon as we go to the next page the values entered in the previous one get null and throws an error while saving.

How to resolve this issue?

  • 2
    you can pass inserted account id to the next page or if you really want to build wizard read this article developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/… – Himanshu Nov 2 '17 at 10:09
  • Either you can use same controller for both page or you can use salesforce server side Cache.Session Methods or you can pass value from page to page using CurrentPage().getParameters(). – NITHESH K Nov 2 '17 at 10:38

Use the same Apex controller for each page in your wizard. Here's a helpful tutorial.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.