Skip to main content
Hello,

I am trying to create a "Mass Clone" and a "Mass Delete" button that will be visible from the list view of Tasks. My current approach is to create a flow that takes in a collection of records and loops through to either delete or clone them. I'm just focused on the 'delete' for now, once that's working I will add to the flow or create a new one for 'update'. 

To kick off the flow, I have a visualforce page that is added to a List View button. This visualforce page should collect the marked records and pass them along to the flow. 

First, is this even possible?

Second, am I on the right track?

The flow is pretty straight-forward.

Pass in records from a Task list view to a flow using Visualforce

This is what I have for my visualforce page.

<apex:page standardController="Task" tabStyle="Task" recordSetVar="tasks">

<apex:repeat value="{!tasks}" var="row" rendered="false">

{!row.Id}

</apex:repeat>

<flow:interview name="Task_Delete">

<apex:param name="TaskCollection" value="{!tasks}" />

</flow:interview>

</apex:page>

Finally, here is the setup for the List View button.

User-added imageThanks in advanced!

 
2 个回答
  1. 2020年6月12日 19:10
    Hi Caleb,

    Greetings!

    Yes,you can pass the the list of record from VF page to Flow.

    Please find the step by step process of this in the below document:

    https://succeedwithsalesforce.com/multi-select-and-mass-update-records-in-lightning-list-views-using-flows-visualforce-and-a-list-button/

    Reference:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_setting_values.htm

    Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

    Warm Regards,

    Shirisha Pathuri

     
0/9000