You need to sign in to do that
Don't have an account?

unknown contructor
I have a visualforce page that I wamt to hook to a custom button on the Contact page layout. When a user clicks on the button it will open the visualforce and display a list of records from a custom object that is related to a specific contact.
I setup the page using the standardController="Contact" and the extensions attribute...i.e. extensions="MyControllerExtension"
MyControllerExtension uses the StandardSetController so I can use pagination to page over the results, but I'm getting the error: Unknown constructor 'MyControllerExtension.MyControllerExtension(ApexPages.StandardController controller).
If I use the custom controller...i.e. controller="MyControllerExtension" then the visualforce page is not accessible to select as an option for the custom button. How can I use the standardSetController in the my controller and still use the standardController from my VF page so I can hook the custom button to my page?
Thanks.
Try the following in your class file:
All Answers
Try the following in your class file:
Write like this
public class ExtensionController{
public ExtensionController(ApexPages.StandardController stdController) {
}
}
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks