Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test a screen flow that needs a record Id

Debug a screen flow that needs a recordId: paste a record Id in Flow Builder, run it from the record page, and see why it is blank from Setup.

You built a flow for the Account page, pressed Run in Flow Builder, and every screen came back empty. Nothing is broken: there was no record to pass. Here you test the flow with a real record Id, then on the page itself, and guard it against the empty case.

Debugging a screen flow in Flow Builder with a recordId value: the Run Details show recordId set and the Get Records element finding the Account, beside the screen listing its three open Cases
Debug with a real Id: the screen and the debug details agree.

Before you start

Steps

1

Copy a record Id

Open the record in Lightning. Its Id is the part of the URL after the object name: in /lightning/r/Account/001.../view, copy the value that starts with 001.

2

Debug with that Id

In Flow Builder, click Debug. A panel opens on the left with a field for each input variable: paste the Id in the recordId field and click Run.

The flow's screen appears on the right, and the Run Details tab on the left shows what each element did. Check that your Get Records element found the record before you look at the screens.

3

Run it on the record page

Activate the flow and open a record where it is placed (Flow component or Quick Action). This is the real test: it proves the page passes the Id, which Debug cannot.

4

Guard against a missing Id

Add a Decision right after the Start element: {!recordId} Is Null True goes to a screen that says "Open this flow from an Account". Users who start the flow from the wrong place get a clear message instead of empty screens.

5

Save and test

Debug once without a value: you reach the message screen. Debug again with the Id: the screens show that record's data.

Why it is blank when launched from Setup

recordId is only filled when something passes it: the Pass record ID into this variable checkbox, a Quick Action, or a value you type in Debug. Run in Flow Builder, the Flows list in Setup and a Flow component on a Home or App page pass nothing, so the variable stays empty. Then:

  • Get Records filtered on {!recordId} finds nothing.

  • An Avonni Data Table or Map with a query filter on {!recordId} shows no rows.

  • An Avonni Record Detail with an empty Record ID switches to create mode and shows a blank form for a new record.

Troubleshooting

Debug works, but the flow is empty on the record page

The page does not pass the Id. Check Pass record ID into this variable on the Flow component, and that the page you edited is the one assigned to your app and profile. For a Quick Action, the variable must be named exactly recordId.

The Debug panel has no recordId field

The variable is not marked Available for input. Edit it in the Toolbox, check the box, save, and open Debug again.

Was this helpful?