2

I am working on including a Flow via Custom Button, and so I created a Visualforce Page which includes a <flow:interview> component and references a Flow.Interview on an extension.

Page

<apex:page standardController="Case" extensions="MyExtension">
    <flow:interview name="My_Flow_Unique_Name" interview="{!interview}"/>
</apex:page>

Extension

public with sharing class MyExtension
{
    public Flow.Interview interview { get; private set; }
    public MyExtension(ApexPages.StandardController controller)
    {
        Map<String, Object> inputs = new Map<String, Object>
        {
            'caseId' => controller.getId()
        };
        interview = new Flow.Interview.My_Flow_Unique_Name(inputs);
        interview.start();
    }
}

When I try to save the page, the Developer Console prevents me from doing so. Unfortunately, the error message is blank so it is not clear what I'm doing wrong.

FlowDemo blank error

If I remove the interview="{!interview}" attribute specification, the page compiles. But I need to set this attribute so I can provide the proper inputs. What am I doing wrong here? How can I fix it?

4

Change public Flow.Interview interview { get; private set; }

to

public Flow.Interview.My_Flow_Unique_Name interview { get; private set; }

The VF page saves after compilation in developer console.

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.