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
Raghu NaniRaghu Nani 

How to Hide CustomButton On Some BooleanCondition

Hi friends ,, I need to Hide The CustomReport Button Untill Order Status Changes to completed
Can Any One help on this
Vijay NagarathinamVijay Nagarathinam
Hi Raghu,

Refer the below link you get some idea about hiding the custom button in visualforce page.

Let me know if you need any help regarding this.

Hi Raghu,

Custom buttons on VF page can be hidden using the "rendered" attribute. (If you require sample code let me know).

Custom button on Page layouts cannot be hidden however by writing clever JS in the button etc you can restrict the button on performing any actions unless validations are met.

Hope this helps, if it does then kindly mark this as the best answer.

Mahesh DMahesh D
Hi Raghu,

You can use rendered attribute of command button something like below :
<apex:commandButton value="Cancel" immediate="true" action="{!Cancel}" rendered="true"/>
// you can also bind it with a boolean property inside your controller.

Also for your reference, you can look into below link:

Raghu NaniRaghu Nani
Thanks to all I am Working on it