I am trying to call a Visualforce page from a custom list button. I have done this successfully from a detail page button by creating a page using a standard controller for the detail object, selecting Visualforce page as the content source and then picking the page I wanted from the pull down list for content.

However, I can't seem to get this to work for a list button. I pick the list button option on the custom button or link page, and pick visualforce page for the content source, but I don't get my visualforce page to appear in the content pull down list.

1 Answer 1


You need to use recordSetVar on your page to make it available for custom List view button.

<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" extensions="tenPageSizeExt">
    <apex:form >
        <apex:pageBlock  title="Edit Stage and Close Date" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            <apex:pageBlockTable value="{!selected}" var="opp">
                <apex:column value="{!opp.name}"/>
                <apex:column headerValue="Stage">
                    <apex:inputField value="{!opp.stageName}"/>
                <apex:column headerValue="Close Date">
                    <apex:inputField value="{!opp.closeDate}"/>

Adding Custom List Buttons using Standard List Controllers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .