+ Start a Discussion
BenzyBenzy 

Pass IDs of selected records in list view into a flow

So I have created flows before where the flow is started from a record using a custom button, and that record's ID is passed into the flow as a variable, which is great!

However, I now want to do this but starting from a list view, where I would select (check) a bunch of records and then click a custom button to start the flow, and have the record IDs of all the checked records pass into the flow as a list of variables (I think it would be an sObject variable?)

Is this possible? 
Thanks
Ben MorchBen Morch
Benzy - Did you ever find a way to do this?

I am looking for a way to do this as well.  I want to grab the ID's from a list view and pass them into a flow.  Can this be done from a javascript button using {!GETRECORDIDS(ObjectType.<CustomObject__c>)} then using window.open('<flowURL link>')?  How would I set the records retrieved from the list view to a flow variable?

Thanks!
Esti LeiserEsti Leiser
I need this too!
BenzyBenzy
No, I never found a way to do it. I did figure out a work around though.

You basically use a record update to trigger a process (Process Builder) that then runs a flow. The record ID can be passed into the flow using process builder.
  • Create a new checkbox field on the object
  • Creat a listview javascript button to mark multiple records as TRUE
  • Create a new process to fire the flow when the above checkbox is marked as TRUE
This is a bit different, in that you are not updating multiple records in a single flow, but rather running a new flow for each record. But from the user perspective, it looks the same.
KRayKRay
One way of doing this would be to embed the flow within a visualforce page. From there, the controller could process the records and pass the results back to the visualforce page or loop it back to the flow on a one-one basis . That's if you're not using Process builder. I haven't used process builder but the limitation of a basic flow may stand in your way.
torctorc
If anyone is still working on this, try this post: http://succeedwithsalesforce.com/multi-select-and-mass-update-records-in-lightning-list-views-using-flows-visualforce-and-a-list-button/
Esti LeiserEsti Leiser
So cool, thank you!