+ Start a Discussion

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

update detalles;

//Redirect to same page
PageReference acctPage = new PageReference('/'+ApexPages.currentPage().getParameters().get('idcap'));
return acctPage;
Message Edited by Yucel on 04-15-2009 04:11 PM
this is good...do you, by chance, have the test method as well?