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

How to override the standard save button of account object
Hi,
I had requirement to do some extra stuff when user create a new an account or edit an account. So I want to overrride the standard save button .
I wnat to override the save button in apex could anyone guide me how to do that.
Thanks
I had requirement to do some extra stuff when user create a new an account or edit an account. So I want to overrride the standard save button .
I wnat to override the save button in apex could anyone guide me how to do that.
Thanks
Create an extension class ,as shown in the below example,
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
And then you can override the save function in the extension class. code looks like below.
public PageReference save() {
// Put your own stuff here
PageReference newPage = New PageReference('/apex/<page name you want to return>');
newPage.getParameters().put('id',ApexPages.currentPage().getParameters().get('id'));
newPage.setRedirect(true);
return newPage;
}
Some documents to help you.
https://help.salesforce.com/HTViewHelpDoc?id=links_override_considerations.htm&language=en_US
Hope this helps.
Regards,
CloudSavvyProg
If any of above solutions has resolved your issue then please mark it as solved.
Thanks,
CloudSavvyProg
I have a requirement like yours. Have you got output. If yes can you please share your code.