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

How to disable the edit and delete button?

In my detail page i have a custom button called submit, when the submit button is clicked the order staus is changing from pending to confirmed.After that the user cannot be able to edit the order.please help me to make the edit button disable after the order is confirmed.

Best Answer chosen by Admin (Salesforce Developers) 


VisualForce Page:- 


<apex:page controller="Test" id="p1">

<apex:form id="f1">



function check()




<apex:commandbutton id="button1" value="Button1" onclick="check()" />

<apex:commandbutton id="button2" value="Button2" />






Here is a simple examples when we click on button 1  then Button 2 is to be automatically hide from page. you can help from this code for solve your problem .


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.