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
Aaron Persich 8Aaron Persich 8 

Your Flow Finished Message

Hello,

I am working with flows in our test enviorment and the flow works from a button I created.  However, when I select the button to run the flow I get the below message.  I currently have to hit the back button on my browser to go back to the object and then I have to refresh it to show the results.  Is there a way to imilinate this message and refresh the object to show the flow results?  

User-added image

Thanks,

Aaron
Brian CherryBrian Cherry
I embeded the flow in a visualforce page and added this: You can add a close button to this page on the bottom that users can click or they can simply X out of the flow window. The parent page will refresh automatically.

<script type="text/javascript">
    function closeWin(){    
        if(window.parent){
            window.parent.opener.location.href = window.parent.opener.location.href;
            window.parent.close();
        }   
        else{
            window.opener.location.href = window.opener.location.href;
            window.close();   
        }   
    }
    function closeWindow_NoAction(){
        window.close();
    }

</script>

 
Aaron Persich 8Aaron Persich 8
Thanks Brian.  This is a good work around.  However, we have other flows where the "Your Flow Has Finished" message does not populate.  Is this a flow setting or something?
BalajiRanganathanBalajiRanganathan
This might help. you could try using the retUrl but check the Note about that on the link below.

https://help.salesforce.com/HTViewHelpDoc?id=vpm_admin_onfinish.htm&language=en_US
 
Brian CherryBrian Cherry
Hey Aaron,
My guess is they use Balaji link and set a finish location. So when they click finish, it goes to another VF page that closes and refreshes the parent page. If it's an old flow prior to I think 2013, there was a desktop program that allowed the programmer to do some interesting things with the flows. Sadly it's not available anymore.

Take care,
Brian
Anh Tran 43Anh Tran 43
You can make a visual page look like below

<apex:page standardController="Drawing__c">
<flow:interview name="Update_Drawing_Name_To_Each_Item">
...
</flow:interview>
<script>
self.close();
window.parent.location.href='/{!Drawing__c.Id}';
</script>
</apex:page>
Anh Tran 43Anh Tran 43
With that way, you don't need to embed the visual force page to salesforce , just add a new custom button and run the visual force page above.