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
Vasundhara Velgoti 4Vasundhara Velgoti 4 

accessing custom button in visualforce page

I have requirement of 1) I have custom button on Order which is accessing method in apex web service class.  This button has to be displayed on custom visual force page depending on below conditions:( if (lookupfield !=null and fulfilmentrelated list is not empty)  in order) display the custom button " Update". 
2) If( lookupfield ==null and fulfilment related list is not empty) display custom button "create".

Can anyone suggest me the approach how to follow?
Hemant_JainHemant_Jain
Hi,

​See below code, to hide and show both buttons conditionally:
<apex:commandButton value="Update" action="{!updateAction}" rendered="{!IF(AND(lookupfield!=null,fulfilmentList.size>0), TRUE, FALSE)}"/>

<apex:commandButton value="Create" action="{!createAction}" rendered="{!IF(AND(lookupfield==null,fulfilmentList.size>0), TRUE, FALSE)}"/>
Kindly mark this as best answer if this works.
Vasundhara Velgoti 4Vasundhara Velgoti 4
I am facing issue in placing this custom button in vf page as other buttons are handled in css and jquery:(