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
DaveHagmanDaveHagman 

Calling a VF page using a custom button

Linking a VF page to a custom button on the Case page seems like an easy task. I create a new custom button, created multiple VF pages to link the button to but when I choose "Visualforce Page" for the button's Content Source field none of my vf pages appear in the drop down. I have made sure that the pages are available to everyone (In the security section for your VF page). Is there something that I'm missing? Sorry if this is a really dumb issue but I know I must be overlooking something really basic.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdc guy.ax723sfdc guy.ax723

Dave, a question back to you.

 On your vfPage are you using a Standard Controller  such as  <apex:page standardController="Opportunity" > or <apex:page controller="myCustomController" >

 

If you are using a <apex:page standardController="Opportunity" > with an extension your vfPage should show up automatically.

If you are using a custom controller you need to edit the sObect your are trying to add the button to with the actual weblink xml:

 

Sample of a List View Button on Opportunity:

 

<webLinks>
        <fullName>Edit_Selected_Opportunities</fullName>
        <availability>online</availability>
        <displayType>massActionButton</displayType>
        <height>600</height>
        <linkType>page</linkType>
        <masterLabel>Edit Selected Opportunities</masterLabel>
        <openType>sidebar</openType>
        <page>OpportunityMassEdit</page>
        <protected>false</protected>
        <requireRowSelection>true</requireRowSelection>
    </webLinks>

 

The Documentation can be found in the Metadata API Developers Guide: http://www.salesforce.com/us/developer/docs/api_meta/index.htm

 

 

 

 

 

 

All Answers

sfdc guy.ax723sfdc guy.ax723

Dave, a question back to you.

 On your vfPage are you using a Standard Controller  such as  <apex:page standardController="Opportunity" > or <apex:page controller="myCustomController" >

 

If you are using a <apex:page standardController="Opportunity" > with an extension your vfPage should show up automatically.

If you are using a custom controller you need to edit the sObect your are trying to add the button to with the actual weblink xml:

 

Sample of a List View Button on Opportunity:

 

<webLinks>
        <fullName>Edit_Selected_Opportunities</fullName>
        <availability>online</availability>
        <displayType>massActionButton</displayType>
        <height>600</height>
        <linkType>page</linkType>
        <masterLabel>Edit Selected Opportunities</masterLabel>
        <openType>sidebar</openType>
        <page>OpportunityMassEdit</page>
        <protected>false</protected>
        <requireRowSelection>true</requireRowSelection>
    </webLinks>

 

The Documentation can be found in the Metadata API Developers Guide: http://www.salesforce.com/us/developer/docs/api_meta/index.htm

 

 

 

 

 

 

This was selected as the best answer
DaveHagmanDaveHagman

I am using a custom controller... not an extension so that's it. Thank you!