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
jayanth reddyjayanth reddy 

is there any way to restrict buttons only to top in standard page

is there any way to restrict buttons only to top in standard page
 
Raj VakatiRaj Vakati
If you can use the quick actions .. then button will be appear on top 

or if you use the    visualforce you can do this with custom page as below. For standard pages I do not think it is possible.
 
<apex:pageBlockButtons location="top">
    <apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>

 
Saravanan RajarajanSaravanan Rajarajan
Hi Jayanth,

As you tagged this question to visualforce you can do this with custom page as below.

For standard pages I do not think it is possible. 

I believe you are using <apex:pageBlockButtons> for buttons. There is a location attribute present in it. As per Salesforce documentation the description for this attribute is -- The area of the page block where the buttons should be rendered. Possible values include "top", "bottom", or "both". If not specified, this value defaults to "both".

You have to use top to show buttons only on top.
 
<apex:pageBlockButtons location="top">
    <apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>

You have to use Bottom to show buttons only on Bottom.
 
<apex:pageBlockButtons location="bottom">
    <apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>

You have to use Both (Top & Bottom) to show buttons Both (Top & Bottom).
 
<apex:pageBlockButtons location="both">
    <apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>

Please mark it best answer if it helps you.