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
QualquunQualquun 

How do you finish a workflow?

I figured out how to start it, but I am doing it from a button. How do i end it that way? It'd be nice if it didn't loop back around.

Best Answer chosen by Admin (Salesforce Developers) 
elmaschingondeguateelmaschingondeguate

You can use the RetURL parameter on the link that calls the flow so you decide where to be redirected when it finishes.

All Answers

elmaschingondeguateelmaschingondeguate

You can use the RetURL parameter on the link that calls the flow so you decide where to be redirected when it finishes.

This was selected as the best answer
QualquunQualquun

Thank you so much!

markross__cmarkross__c

Great! But is there a way to make the flow window close and the source window refresh when you click Finish?

I'm guessing not... :(

QualquunQualquun

Yeah that definitely would be nice...but I have no idea how to do that either. :( For now the redirect should work.

elmaschingondeguateelmaschingondeguate

For that you would need to embed the flow in a VF page and handle that with code. 

wahoobiewahoobie

Would this VF page suggestion require setting some type of var in the workflow and having the page code act on that condition?  Just trying to head in the right direction and this is all new to me (taking small steps).

 

Thanks for this great community (first post!!)

InternalServerErrorInternalServerError

wahoobie wrote:

Would this VF page suggestion require setting some type of var in the workflow and having the page code act on that condition?  Just trying to head in the right direction and this is all new to me (taking small steps).

 

Thanks for this great community (first post!!)


I guess there are many ways to do this, but following the advice given above. I would do this.

 

Create some JS code on the page that will execute after  you click on the button, then just refresh the page using JS.

 

BenPBenP

Also check this page

 

page