1

I'm trying to create a new Custom List Button which can redirect to a visual force page. The problem I'm facing is that the "Content" selector at the bottom of the "Custom Button Edit" page. There is nothing to select and cannot link it to the visual force page which we want to launch from the new button.

enter image description here

Just as some more project FYI, we are attempting to create a custom visual force page to mimic a task page so that we can control available tasks based on the lead/contact status.

How can I populate this Content dropdown?

1

You need to have a Visualforce Page which implements a StandardSetController for the object in question. So if it were a List Button on the Task object, you would use this markup:

<apex:page standardController="Task" recordSetVar="tasks">

If you wanted to add some Apex your markup would change to:

<apex:page standardController="Task" recordSetVar="tasks" extensions="MyExtension">

And your extension would need to define the following constructor:

public MyExtension(ApexPages.StandardSetController controller)
{
    // constructor logic
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.