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
Glenn Nyhan 26Glenn Nyhan 26 

Attaching a Visualforce Page to a Button

I created a Flow with a script to collect data for new Cases that come into our Volunteer Hotline at a nonprofit. The script works fine. The next step is to create a new button or override the current default New case button in the Case object to launch the Flow. I created the Visualforce page for this and it does what it should in preview mode, so great, good there. Now I want either to override the current NewCase button or create a new button using the Visualforce page (prefer to override as being the best approach since it will change the default button on all pages in Case or Contact records that need to go to the Flow script), but when I go to create the button or override the current button, when I click the Visualforce radio button and the dropdown next to it to select the Visualforce page --None-- is all that comes up, no listing for the Visualforce page. I can't seem to get past this so it connects the Visualflow page . Can anybody tell me the solution? Is it a permissions based issue? I am the Admin, and do have Development Mode checked on my User Details.  
Best Answer chosen by Glenn Nyhan 26
DavidGantDavidGant
Glenn,

You will just need to add the standardController="Case" portion to the apex:page tag (see below). I also recommend adding the tabStyle portion since you are overriding the Case standard button.
<apex:page standardController="Case" tabStyle="Case">
    <flow:interview name="New_Case_Flow"/>
</apex:page>
Hope this helps

David

All Answers

anto nirmalanto nirmal
Hi Glenn,

Please ensure that the VF page's standard controller is Case in order to make the page available in the corresponsing Object's Page.

Let me know if this helps.

As a common practice, if your question is answered, please choose 1 best answer.
Additionally you can give every answer a like if that answer is helpful to you.

Regards,
Anto Nirmal
 
DavidGantDavidGant
Glenn,

You will just need to add the standardController="Case" portion to the apex:page tag (see below). I also recommend adding the tabStyle portion since you are overriding the Case standard button.
<apex:page standardController="Case" tabStyle="Case">
    <flow:interview name="New_Case_Flow"/>
</apex:page>
Hope this helps

David
This was selected as the best answer