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
krishna p 28krishna p 28 

maintain view state/ stateful apex controller

HI,
I have a requirement to maintain the view state of a page and carry the parameter to third page and insert this parameter along with other parameters of third page into account. I am using same controller for all three pages. Is there any way to make apex controller stateful or carry the parameters to 3rd page.

In second page I am capturing the parameters of child of account. I want these parameters also carrie dto third page. After inserting the account in 3rd page, I want to query the id of account and then insert the child object parameters captured in 2nd page and tie them to this account.

Is this approach correct?
Any thoughts or workarounds are highly appreciated.

Thanks in Advance.

Regards,
Krishna
Shashi PatowaryShashi Patowary
Hi Krishna,

What I have understood that you are basically trying to create a searies of pages for data entry - also called as Wizard.The simple way to achieve it - you can create your vf pages as per required data entry and maintain the state of pages using a common controller class.

You can find a good example in VF page guide. Please refer to the below link -

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_wizard.htm

Please let me know if it helps.

Regards,
Shashi