Trigger a Screen Flow (for follow-up task creation) from a List View Button (for the selected records) #inSalesforce

Trigger a Screen Flow (for follow-up task creation) from a List View Button (for the selected records) #inSalesforce


Scenario: Select the leads(/or other object records) you want from the list view and create a follow-up task for them.

Steps:

Create a screen flow, Button in List View


Create a screen flow:

Screenflow

New resource: variable, name it - ids(available for i/p selected), text, allow multiple values - this is to collect the ids selected

Create a loop:

Create a task for each lead selected

LoopThrough, Collection variable - ids

Assignment - to set value for task variable

Create New resource - variable, record type, theTask

Set:

theTask.Subject equals Follow up the Lead

theTask.DueDateOnly equals New resource - formula -name it 7days - TODAY()+7

theTask.AssignedTo equals $!user.Id

theTask.Subject equals Not Started

theTask.WhoId equals loopThrough.Id

Assignment- to add the Task to the Collection

Create variable theTasks, record type, allow multiple... selected, Task object

theTasks Add theTask

Outside of loop - Create -

Create Task(s)

In collection - theTasks

Add Screen with some display text that this was done successfully

Connect well, Save, Activate


Object Manager | Lead | Button.. | Add Follow up Task for selected Lead(s) - Name like this, make sure the display checkbox is selected and List Button selected

Use the formula like /flow/[flowAPIName]


List View Button Layout - Add the above-created button and Save


Test it















                                  Visual:  https://www.youtube.com/watch?v=Kgfixd-leKQ



Comments