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
justinpauldavisjustinpauldavis 

Invoke Visualforce Page from Custom Button

I'm trying to create a simple invoice mechanism using a custom button and a visualforce page on the opportunity. I simply want a window to open and have merge fields displayed within HTML.

 

But when I go to create the button, the visualforce page I've made isn't available on the "Content" drop-down. Is there something else that needs to be done to make a visualforce page available to a button?

 

Thanks

cloudcodercloudcoder

You need to make sure that your Visualforce page uses the standardcontroller of the standard page/object you are placing your custom button on.

 

If you want to do something more in the controller, simply use a controller extension as well.

 

 

justinpauldavisjustinpauldavis

So if I add the standard controller...

 

Then when I create the custom button, in the drop-down for "Content" that visualforce page will be available to invoke?

 

Thanks

cloudcodercloudcoder
Yep. Let me know if it works.