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

Overriding Approval Process Buttons

Hello Friends,
I have a requirement wherein i need to override the Standard Approval Process buttons like Recall, Submit to redirect to my custom VF page instead of going back to the standard detail page.
Does anyone know how can this be done either through apex or some other way?
Any help would be very useful.

Message Edited by Cool_Devloper on 12-29-2008 11:26 AM
In the scenario of the approval buttons being on the Accounts object then you need to go to Setup>Customize>Accounts>Buttons and Links and override the buttons you want specifying your VF pages.
I believe the question was how to override the approval/recall buttons on the workflow approval.  These buttons are not listed on the standard objects "buttons and Links" section in setup.
I have looked for this as well, and have not been able to figure it out, except, if you make a complete duplicate of the standard object page in VF, and make a custom related list for the approval flow with custom buttons.
Ah my bad. You are correct no standard way of doing this in Setup.

Message Edited by MATTYBME on 01-06-2009 10:41 AM
Thanks for the replies.
I am sure we cant really over-ride or reproduce the whole functionality as it would be too complex and might not be feasible as well.
Maybe we have to wait till a way of doing it comes as part of a next release.
By the way, i am also trying to over-ride the standard links which come on the standard home page of objects like name, edit, delete etc. I found that we can over-ride the edit and delete links, but could not find how to over-ride the name link so that i can re-direct the user to my custom VF page instead of going to the standard detail page when he clicks on the name of the objcet from the displayed list.
Is there a way i can achieve this?
Many Thanks,

Message Edited by Cool_Devloper on 01-06-2009 06:37 PM
When you mean name I am assuming you mean the name of the Account, Contact, Opportunity, etc that is displayed as a link on the object homepage, correct?

If this is so then I do not believe there is a simple way of overriding those links. Your best bet is to recreate your object homepage so that those links point to your new details page. However, if you do this you need to create a new tab and assign your new VF object homepage to that tab. If you do not do this you will override your object homepage for your entire Salesforce instance.

I did this for Cases so have a template of code if you need.
Hello Mat,
Well there is some good news for you.
I did the overriding by just overriding the Standard Buttons/Links of the respective objects with my VF pages. So, now when i click on either the name(view button), edit,new etc i am being redirected to my custom VF page without the need to recreate custom home pages.
This makes the job very simple. Do try this. Hope it works for you!!
Thanks. Wasn't quite sure what you was meaning by "name link" but now I understand you meant view button of course it is just a buttons and links override. Happy Days!

Actually, the view button override applies to the "name link" on the object's home page as well as finally it is a view only.

You got it right Matt. Thanks for all the help :)




Did you ever find a solution to override Submit Approval button and redirect it to a VF page?


@trinity: there is a solution here:


Good luck.