Dynamic Forms for Flow became a generally available feature in the winter 23 Salesforce release. The name is perhaps a bit unfortunate because Salesforce has another feature called Dynamic Forms, which is completely different.
However, if you can get past that, and I recommend you do, then you will find that Dynamic Forms for Flow is a really useful feature.
So what does Dynamic Forms for Flow do?
The first thing to say is that this is a moderately technical feature, requiring a basic knowledge of some fundamental Flow features. It’s probably also worth adding that this only works in Screen Flows and specifically on the Screen element within these flows.
The main point you need to understand to use Dynamic Forms for Flow is what a record variable is.
This is a variable that stores an entire record of a specific Salesforce object. You can also have record collection variables, but as far as Dynamic Forms for Flow goes, it’s the single record variable that matters.
So how does it help?
With Dynamic Forms for Flow, you must create the record variable first, but once the variable exists, on a screen element you can drag the fields directly from the record variable onto the flow screen.
We use this in pretty much every Learnsmarter Flow screen where you’re creating or editing records. Now, Learnsmarter flows are overwritable, which means you can extend and change them. The simplest use case for that is if you’ve added some new custom fields and you want to include them in the Flow.
And to do that, you use Dynamic Forms for Flow.
First you open the flow, then open the screen element where the record is created or edited.
You then select the record variable.
In Learnsmarter, we always name these variables rec[ObjectName] so recCourseVersion for example. This name format is only ever used for single record variables.
Once you’ve located the record, then you can just drag the field or fields onto the screen.
You can then save the flow as an override to the original flow and your custom fields get included in the wizard.
How cool is that?
There are a few other important steps that you must also carry out, of course.
The first is to thoroughly document any and all changes that you make, so that if you or anyone else ever needs to revisit this, they’ll know what was changed and why.
The second is to make sure you test this thoroughly and test it as different users to make sure that they all have the correct permissions. Oh – and, of course, do this in a sandbox first, never in production!