5 steps for Quick Actions to give a Screen Flow the record it started from
Starting a Screen Flow from a Quick Action is a scenario I’ve encountered a few times.
If you haven't already, I suspect you will come across this use case sooner rather than later.
Each time I’ve encountered it, I’ve needed the Flow to access the field values from the record it was started from. This is because this data usually informs the business process that the Flow is supporting.
Here are 5 steps you can take to give a Screen Flow all of the field values from the record a user is on when they click a Quick Action.
For the purpose of this example, I'm going to assume the Flow is being started from an Account, but you can easily customize these steps to any Object you are working with.
Step 1:
From your Screen Flow, click “New Resource” and fill in the screen as outlined below:
Step 2:
Build the rest of the Flow logic that your use case requires and “Activate” it for testing.
For the purpose of this example, I've just created a single screen that will show field values from the Account that the Flow is launched from. I suspect your Flow will be more robust than this!
Step 3:
Go to Object Manager, select the Object you are working with and go to “Buttons, Links and Actions.”
Click “New Action” and complete the fields as outlined below:
领英推荐
Step 4:
Make the Quick Action visible, either through a Page Layout or a Dynamic Action on a Lightning Page.
If you use Page Layouts to display your Quick Actions, select "Mobile & Lightning Actions", find the name of the Quick Action and drag and drop it into the "Salesforce Mobile and Lightning Experience Actions" section.
If you use Dynamic Actions to display your Quick Actions, make sure that the action is selected and has the correct visibility conditions.
You can do this by going to the appropriate Lightning Record page, clicking on the Highlights Panel component and clicking "Add Action." This will open the pane where you can select the Quick Action name and set any visibility conditions.
Step 5:
Test your Quick Action and Flow.
Firstly, verify that the Quick Action is visible.
Then verify that clicking the Quick Action opens the Flow and the rest of your logic works.
As you can see from the highlighted image below, my Flow screen is showing two fields from the Account record that the Flow was started from, meaning that the record and its field values were passed into the Flow successfully!
Happy Flow building!
re: API Name:?Use "recordId". It?must?be in this format for the Quick Action to be able to give the Flow the record and all of its field values. This was driving me crazy! I had "recordID" stored as such and the flow was NOT behaving. That little adjustment got me unblocked. Thank you!
problem solver | resource wrangler
3 年I am going to give this a try to compare to my workaround! My trick for this one was to make the first screen of the flow a radio button that requests the user to "confirm" the starting object using a logically named field. When I add the flow to the page, I pass the recordId into the screen flow so the radio button has data. This is a little clunky because it's the object they are in so I imagine it's a bit of a "um, duh" feeling, but no audible complaints yet. Then within my flow I "get" the record of object they just confirmed and use this as needed.