You need to sign in to do that
Don't have an account?
DaniHell
How can I overwrite the save button to change on a custom page
When I use the standard save action in the commandButton it goes every time to the default page.
But I want to chamge to a custom page when i click on the save button..how??
I tried a lot of things like this...
public Pagereference goHome(){ Pagereference to = Apexpages.currentPage(); to.setRedirect(true); return to; } or public Pagereference goHome(){ Pagereference to = new Pagereference('/apex/mypage?user=guest'); return to; } <apex:commandButton value="Save" action="{!goHome}" />
Any solution??
Sample Code:
Visualforce page:
<apex:page controller="sample">
<apex:commandButton value="Open" action="{!openPage}"/>
</apex:page>
Apex Class:
public class sample
{
public pageReference openPage()
{
pageReference pg = new pageReference('/apex/Name_Of_The_Page');
pg.setRedirect(true);
return pg;
}
}
https://sites.google.com/site/infallibletechie/how-to-open-another-visualforce-page-from-current-visualforce-page-in-salesforce
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
SFDC Site
If this post is your solution, kindly mark this as the solution.