You need to sign in to do that
Don't have an account?

How override a save button in extension visual force
Hi, I have problems in save button overrides but i found the solution and post one.
this is an sample how to override the save button:
//Method to override
public PageReference save()
{
//Logical actions
//Action
update detalles;
//Redirect to same page
PageReference acctPage = new PageReference('/'+ApexPages.currentPage().getParameters().get('idcap'));
acctPage.setRedirect(true);
return acctPage;
}
this is an sample how to override the save button:
//Method to override
public PageReference save()
{
//Logical actions
//Action
update detalles;
//Redirect to same page
PageReference acctPage = new PageReference('/'+ApexPages.currentPage().getParameters().get('idcap'));
acctPage.setRedirect(true);
return acctPage;
}

this is good...do you, by chance, have the test method as well?