+ Start a Discussion
kshannonkshannon 

Trying to make a button that links to visual force page

I have created the page and have gone to the proper section under customization for buttons and links. I am having trouble creating the button and having it link to a visual force page. When I go to the drop down of Visual Force page, the content is empty. I am assuming that I need to somehow enable or associate the pages so that they will work with content. If anyone could help I'd greatly appreciate it.

 

Thanks,

Kyle

Best Answer chosen by Admin (Salesforce Developers) 
kshannonkshannon

Great answer, thank you so much.

 

Kyle

Message Edited by kshannon on 12-14-2009 01:38 PM

All Answers

MVJMVJ

I had the same issue.  I resolved it by using a URL.

 

The URL Context is actually simple.

 

 

/APEX/My_ApexPage

 

 

If you find out how to get the VisualForce Page visiable in the dropdown please post it.

 

 

kshannonkshannon
Yeah, I had thought of that solution, but I am trying to refrain due to complications in the future.
JimRaeJimRae

The custom button can only relate to a Visualforce page if that page uses the standard controller of the object the button is being placed on.

 

 

For example, if you wanted to add a button to the Opportunity object, you page would be like this:

 

 

<apex:page standardcontroller="Opportunity" > <!-- Stuff Goes HERE --> </apex:page>

 If you need to extend the functionality of the page beyond the standard controller's functionality, then you would use a controller extension.

 

 

kshannonkshannon

Great answer, thank you so much.

 

Kyle

Message Edited by kshannon on 12-14-2009 01:38 PM
This was selected as the best answer