We have an opportunity page layout that has a custom button on it for feedback regarding that opportunity. If the opp stage ='won' we want to force the user to provide the feedback. This can be done by a validation rule easily enough. However the page layout with the error message that effectively says 'please provide the feedback' does not show the custom button, it just shows the Save & Cancel buttons. Can the custom button be put on this error message page as well so the user can click on it & provide the feedback and save?
Attribution to: George Piumatti
Possible Suggestion/Solution #1
You can't do this using standard pages in a supported way I'm afraid. Custom buttons don't show up on the edit page, and that page is pretty much uncustomizable apart from the fields and sections.
It is possible to add some JavaScript as an HTML area in the side bar and inject a button that way, but that is not supported by Salesforce and could break at any time. Its also fragile, in that you have to rely on certain styles, ids or elements being present on the page so if they change your code breaks.
You could put a feedback field on the opportunity and make the user fill that in when they edit an opportunity and change the stage to 'won', but you'd probably need another validation rule to stop people filling that field in when they shouldn't. Its not a great user experience but its the best that I've been able to achieve without resorting to code.
If you need to change the standard edit functionality, you'll need to go the Visualforce route I'm afraid.
Attribution to: Bob Buzzard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31709