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
Will@X-IO.comWill@X-IO.com 

VFP and Visual Workflow with rerender and finishlocation

Crossposting from Visual Workflow for greater visibility:

 

I have created 2 VFPs to house 2 different visual workflows and instead of refreshing the entire page on each 'Next', I have used rerender to update just the flow's output panel.  What I'm struggling with is that on Finish, I want the to reload the source record (a Case), but since it wants to rerender in the output panel, I receive an error that "This content cannot be displayed in a frame.".  How can I get it to rerender the frame during the flow, but reload the entire page after the flow (instead of the flow looping back to the beginning.

 

<apex:page standardController="Case" title="Create Data Migration Child Case">
<style type="text/css">
        body {
            background: #C2D3FF;
            margin: 20px;
        }

        p.FlowTitle {
            font-size:25px;
            font-weight: bold;
            text-align: left;
            margin: 15px;
        } 
        
        .FlowContainer {
            line-height: 150%;
            margin-left: 20px;
            margin-top: 0px;
            padding: 10px 10px;
            width: 800px;
            background-color: #EEF6FF;
            }
            
        body .bPageBlock  .pbBottomButtons {
            background: #6B7C8E;
        }

        body .bPageBlock .pbBody {
        }
</style>

<apex:pageBlock title="Create Data Migration Child Case">
    <apex:pageBlockSection title="Case Information">
        <apex:outputField value="{!case.casenumber}"/>
        <apex:outputField value="{!case.account.name}"/>
        <apex:outputField value="{!case.asset.name}"/>
        <apex:outputField label="Contact Name" value="{!case.contact.name}"/>
        <apex:outputField value="{!case.subject}"/>
        <apex:outputField label="Case Owner" value="{!case.owner.name}"/>
        <apex:outputField value="{!case.Severity__c}"/>
        <apex:outputField value="{!case.status}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection title="Data Migration Child Case Wizard">
        <apex:outputPanel id="FlowPanel">
            <flow:interview name="DataMigrationCreateChildCase" buttonLocation="bottom" rerender="FlowPanel" finishLocation="{!URLFOR('/{!case.id}')}">
                <apex:param name="varUserID" value="{!$User.Id}"/>
                <apex:param name="varCaseID" value="{!Case.Id}"/>
            </flow:interview>
        </apex:outputPanel>
    </apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 

bob_buzzardbob_buzzard

The way I've handled this in the past is to set a value that causes some javascript to appear into the rerendered panel and execute.  This javascript causes the top window to load the URL that I specify. 

 

Its not exactly the same, but this blog post should show you the technique:

 

http://bobbuzzard.blogspot.co.uk/2011/05/refreshing-record-detail-from-embedded.html