+ Start a Discussion
aditya3aditya3 

How to Disable a standard Button in salesforce ?

i want to disable a button based on a status. say quoting we have "email quote" button. this should be disabled till quote is in Approved status.please guide me on this ?

Any help would be greatly appriciated
Mudasir WaniMudasir Wani
Hello Aditya,

You cannot disable it using standard way.
You can remove the button from page layout 
Go to the object and found the page layout and remove that.

Previously we were using some java script in home page components but that is not an option to use now
http://bobbuzzard.blogspot.ae/2014/06/javascript-in-salesforce-home-page.html

Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
doravmondoravmon
In your apex page, you can have something like:
<apex:button action=??? renderd="{!status}">   this status is a variable in your apex class, can you can make it a boolean value, if it is true, enable, then false disable
saikishorecareer3341.3947811933764766E12saikishorecareer3341.3947811933764766E12
You can do this :

Create two pagelayouts with the button enabled in one layout and disabled on other layout.And write a workflow rule which checks the status field value Based on the value write a field update to chance the recordtype id of required pagelayout.
Amit Chaudhary 8Amit Chaudhary 8
Hi Aditya,

Please check below link. This will resolve your issue:- 

http://www.tehnrd.com/show-and-hide-buttons-on-page-layouts/
Vetriselvan ManoharanVetriselvan Manoharan
Hi,

Create a record type for status and display the page layout based on it.

Thanks,
Vetri