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
Rahul S.ax961Rahul S.ax961 

Question related to command button



I have few questions related to custom buttons and would like know Which of the following are possible:

1) Showing a custom button in edit mode.

2) Hiding a custom button in detail page.


Any help is highly Appreciated,

Imran MohammedImran Mohammed

I dont think #1 can be done if its standard page layout.

#2 can be done but it requires some javascript code to execute either from another custom button or embedded Visualforce page or S-Control.

Rahul S.ax961Rahul S.ax961

Ohh Thanks again,

And forgive me for the questions, i'm a newbie.

but here i have a query, My aim is simply to hide a button if it's a detail page.

That to should be dynamic, shuldn't require any other button or any thing to trigger it.


Imran MohammedImran Mohammed

Should the custom button be hidden from the page layout on a certain condition the record meets or you just want to hide it everytime.

If the latter is true, then you can just remove the Custom Button from the Page Layout.