Pass Record Id to Flow in Quick Action

Are you reading Samantha Shain’s blog The Data Are Alright yet? I LOVE how she talks through all the ups and downs of building her first flow – which is a really complicated one, by the way! She shares her thought processes, her research and her frustrations, pride and other feelings so openly. So if you see an increase in feelings shared here, you know who inspired me!

In Sam’s post, she mentions a few things that she had trouble figuring out. She uses a custom button or link with a URL to pass a record id to a Flow. As she guessed, there is a more elegant way to do it. So elegant even Lady Whistledown would approve.

Netflix marketing image of the TV show Bridgerton. A bunch of fancy people looking fancy.
Look to Miss Daphe Bridgerton, this year’s prize debutante, for the most tawdry yet elegant flow solutions in the ton.

CORRECTION: Sam tweeted “I got it from a Quick Action eventually on my own (I wish I had this resource then), but what I really needed was to pass in a *group* of ids from a list view… which afaik is not possible without code.”

Let’s pass an ID to a Flow through a Quick Action.

Use case: Starting on the account, we want to close all open opportunities associated with a button. By the way, you can install this quick solution from the AppExchange. (Affilate link alert! I get 100% of the proceeds when you install my free app from Salesforce Labs).

Here’s my Quick Action where I’ve selected the Flow.

Inside my flow, I create a text type variable called recordId. I know at one point it was case sensitive, but I’m not sure if it still is.

In my Get Records element, I use the recordId variable to search for opportunities associated with the account I started from.

Here’s another great use case: let’s say you’re on an opportunity record and you need help from your trusty Salesforce administrator. Click a quick action to launch a screen flow that creates a task or case in which you ask for support!

Thanks again to Samantha Shain for the great blog post and shout out. Read her post to learn about another use case!

Published by


Jessie joined in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

3 thoughts on “Pass Record Id to Flow in Quick Action”

  1. Thanks for the reminder. As of Aug 2021, recordId is case sensitive, and only the “I” is upper case. With that exact resource, Flow will pick up the record ID of the originating record.

    1. Thank you! I was using a different name and it was not working so I wrote exactly like you said and it worked.

Leave a Reply