I have created a Custom Object(Employee__c) and I have created a VisualForce Page for that custom object and now I like to add a custom button to open any other custom visual force page.

Setup>> Create>>Objects>>Employee>>Custom buttons & links.

Action Type: custom Visualforce

Visualforce Page: I do not see my custom visualforce page here

here is my visualforce page:

<apex:page controller="employee_vfp_Controller" showheader="true" sidebar="true">
   <apex:form >

   //....more code

   </apex:form>
</apex:page>
up vote 1 down vote accepted

You need to add standard controller as well.

The custom object's Standard Controller must be set to make that page visible in Button, Links or Action.

Page looks like:

<apex:page standardcontroller="Employee__c" extensions="employee_vfp_Controller" showheader="true" sidebar="true">
   <apex:form >

   //....more code

   </apex:form>
</apex:page>
  • which standard controller? – Nick Kahn Aug 17 '15 at 14:23
  • 1
    @AbuHamzah The custom objects Standard Controller must be set to make that page visible in Button, Links or Action – Ashwani Aug 17 '15 at 14:24
  • after I have added standard controller as per your answer, now I'm getting : Error: Unknown constructor 'Employee_vfp_Controller.Employee_vfp_Controller(ApexPages.StandardController controller)' – Nick Kahn Aug 17 '15 at 14:24
  • 1
    @AbuHamzah You will need to define a constructor in class which takes ApexPages.StandardController as argument. – Ashwani Aug 17 '15 at 14:26

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.