The RecordDetail component provides new ways to display record fields in Flow screens. Flow excels in providing fine control over field combinations, but sometimes you just want to show a bunch of fields from a record in one place without a lot of configuration. This component handles all the formatting, provides 2 column layout, and takes advantage of additional goodies that the platform provides.
If you don’t provide a specific set of fields, this component will show the entire record:
But you can pass in a specific list of field names:
…and you’ll get just the fields you asked for:
If you set the mode attribute to ‘edit’, you can make changes inline and save them immediately with a save button. Note that unlike everything else in Flow, changes you make inside of this component do not get output for use downstream in the flow. In other words, this component will not output a full record. So if you want to use the data that has just been entered and saved, you’ll need to add a separate downstream Get Records element to pull the full record ‘back’ into Flow.
|recordId||Required. You must pass a valid recordId into this component.|
|mode||can be “view” or “edit”|
|fields||a comma-separated list of field names from the recordId’s object type. If this is not provided, this component will display all fields accessible to the running user’s profile.|
You can have RecordDetail automatically display the subset of fields that’s tied to a particular combination of profile and record type by using actions like:
There’s a good video of this here.
This component uses the recordEditForm and recordViewForm base components and is constrained by their limitations. It doesn’t support all Salesforce standard objects. For example, the Event and Task objects are not supported. This limitation also applies to any record that references a field that belongs to an unsupported object. The list of supported objects is here.
This component responds to your Display Density settings (“Comfy”, “Compact”, etc…).
For behavior like Required and Validation, think of this component as ‘listening’ to the object and field manager in Setup instead of to Flow Builder. I.e. if the field is configured in Setup required in Setup it will be required in this component. If there’s a validation rule on the field in Setup, it will run on save here.
See more Flow Screen Components