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
Mike Lee 12Mike Lee 12 

Visualforce Edit Command button redirect

Hello,

I have a Visualforce page that is using a tab panel and contains 5 individual tabs right now. On tab 5 I'm displaying a few fields using a combo of apex:repeat and a fieldset to limit what is shown. I've included apex:commandbuttons for edit and save on this tab.

What I'd like to have happen is when people click the Edit button people are sent to a second VF page (an edit page basically) i've created that contains only inputfields bounded by the same fieldset I mentioned above.

I've tested the second VF page manually and it works well. The only thing I'm missing is how to send users from the first VF page to the second one when they hit that Edit button.

Any ideas?

Thanks,

Mike
Best Answer chosen by Mike Lee 12
R Z KhanR Z Khan
Your method that you call from your command button should look like thid


public PageReference commandButtonMethod(){
PageReference editPage = Page.EditPageName;
// Your logic here
return editPage;
}

All Answers

R Z KhanR Z Khan
Your method that you call from your command button should look like thid


public PageReference commandButtonMethod(){
PageReference editPage = Page.EditPageName;
// Your logic here
return editPage;
}
This was selected as the best answer
Mike Lee 12Mike Lee 12
Worked like a charm! Thanks for the help...pretty simple to implement.

Mike
R Z KhanR Z Khan
Glad i could help Mike