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
Lakshmi SLakshmi S 

How to hiding the Save and Cancel buttons in Custom detailed visualforce page?

Hi Team,

I have created visualforce page for detailed record without using the apex:detail attribute.
How to hide the Save and Cancel button before inline edit.
<apex:pageBlockButtons >
                
                <apex:commandButton value="Save" action="{!Save}" id="saveButton" />
              <!--  <apex:commandButton value="Save & New" action="{!saveNew}"/> -->
                <apex:commandButton value="Edit" action="{!Edit}" id="editButton" />
                <apex:commandButton value="Delete" action="{!Delete}" onclick="if(!confirm('Are you sure?')){return false};" id="deleteButton" />
                <apex:commandButton value="Clone" action="{!doClone}" id="cloneButton" />
               <apex:commandButton value="Cancel" action="{!doCancel}" id="cancelButton" immediate="true" />
            </apex:pageBlockButtons>

Please let me know, how to achieve this ......

Thanks
Lakshmi.
Best Answer chosen by Lakshmi S
Raj VakatiRaj Vakati
You can do it by Setting style="display: none;"
 
<apex:commandButton action="{!save}" value="Save" id="saveButton" style="display: none;"/>

 

All Answers

Raj VakatiRaj Vakati
You can do it by Setting style="display: none;"
 
<apex:commandButton action="{!save}" value="Save" id="saveButton" style="display: none;"/>

 
This was selected as the best answer
Lakshmi SLakshmi S
Thank you very much for your quick response.