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
Zoom_VZoom_V 

How to include a custom button on a Visualforce page

I currently have a custom button which I am using to launch a Flow by using a VF page as the source (which in tail launches an Apex Class). It works fine, but I need to put it in a VF page now and I'm not sure how to do that. 

This is the VF page which is the source of the button : 
 
<apex:page StandardController="Product__c" Extensions="New_ProductReview_With_Flow_Controller">
<flow:interview interview="{!myflow}" name="Product_Review" finishlocation="{!finishlocation}"> 
<apex:param name="VarProdRecID" value="{!Product__c.Id}"/>


</flow:interview>
</apex:page>

I'm not how the commandbutton line should be set up in the VF page. Should it be using action = ? Should it all be a URL with a param statement in it ?
NagendraNagendra (Salesforce Developers) 
Hi,

I figured this out - for anyone who stumbles upon the same question, this is what worked:
<apex:commandButton action="{!URLFOR($Action.Contract.FC_Edit, Id)}" id="editButton" value="Edit"/>
For more information refer to the below link on the community forums
https://developer.salesforce.com/forums/?id=906F0000000975KIAQ

Kindly mark it as solved if it helps you.

Best Regards,
Nagendra.P