The Record Detail Component

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.

Attributes

recordIdInput – This is the ID of the record to display or 
Output – The ID of a newly created record.
recordTypeId When provided, picklist values will be filtered for the selected record type. Note that if the
object has multiple recordtypes, you _must_ provide a record type Id. Note that it’s easy to provide a picklist that lets the flow user select a record type.
objectApiNameIf you pass in no recordId, an Object API Name, and mode of Edit, the component will open in edit mode and create a new record on save.
modeMode (View or Edit)
fieldsA 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.
flowNavigationOnCancelDirection Specify Previous or Next for the flow navigation direction after the Cancel button is clicked.
flowNavigationOnCancel Check if you would like the flow to navigate to the Previous or Next screen when clicking Cancel.  
For best results, hide the page footer in the flow screen.
flowNavigationOnSave Check if you would like the flow to navigate to the Next screen (or Finish) when clicking Save.  
For best results, hide the page footer in the flow screen.
isCancelButton Output – This value will be set to True is the user selected the Cancel button.

Installation

Version 1.4 (Unmanaged) Production
Version 1.4 (Unmanaged) Sandbox

Version Notes

1.4 – Fix for required system fields on record create screen (2/9/20)

1.3 – Enhancements by Eric Smith (1/24/20)

  • Added a feature to display and handle a Cancel button when in Edit mode
  • Added an option to support flow navigation on record save and cancel
  • Included descriptive labels and help text for Flow parameters

1.2 – Adds ability to pass in a Record Type Id

View Source

View Source

Synergies

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.

Considerations

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.

If you are creating a new record and don’t select a list of fields, the component will include some system fields a required such as Created Date and Date Last Modified.

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

Archived Versions

Version 1.2 (Unmanaged)

Version 1.1 (Unmanaged) (only installs on Spring ’20)

Version 1

60
Leave a Reply

avatar
8 Comment threads
8 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
7 Comment authors
Get a Layout’s Field Names – Flow Action – UnofficialSFAlex EdelsteinDavid Rabizadehrbeachhyp Recent comment authors
  Subscribe  
Notify of
Michael Pierce
Guest

Alex, this component is a game changer. Thank you so much! Any chance you’ll create a installed package for this?

Raphael Barreiros
Guest
Raphael Barreiros

THIS
CHANGES
EVERYTHING

Alex, that INCREDIBLE! I really appreciate that! Thanks for you great work!

Adam White
Guest
Adam White

Been thinking about this for a long time! If we wanted to configure it to also do record creation, would that be a tough thing to do?

Michael Pierce
Guest

Alex, once again — LOVE this component. Is there any way to (1) include the “Next” Flow navigation into the Save button (and then hide the Next button) or (2) make the values in the component output values to be saved in the next step in case the user missed it?

Eric Smith
Guest

I’ve sent up a Pull Request for the following enhancements I’ve made for this component:

Added a feature to display and handle a Cancel button when in Edit mode
Added an option to support flow navigation on record save and cancel
Included descriptive labels and help text for Flow parameters

Michael Pierce
Guest

Eric, thank you so much! This is awesome. I appreciate everything you all do for the community.

vsa1977
Guest

This package is in Beta and hence I wont be able to move to prod when needed. Do you know when you will have V1 available?

Anonymous
Guest
Anonymous

If you have validation rules in place do they surface in this component?

rbeachhyp
Guest
rbeachhyp

Agree that this is a game changer!! Is there any way to set certain displayed fields as required? Also, is there documentation on the “Store Output Values” piece of this? (Forgive me if it should be obvious, but I’m new).

trackback

[…] the publication of the RecordDetail flow screen component, it became easy to get flow to show any list of field names you choose to […]

J Baker
Guest
J Baker

Am I missing something? I have no way to see/modify mode to turn it into an inline editor.

trackback

[…] Example: You want your flow to let the user choose a record type from a picklist and then display the layout corresponding to that record type (This is demonstrated in the video above). The Quick Choice package includes several utility actions that make this easy. You first start out with the GetRecordTypeInfobyObject action, which returns separate collections of recordTypeNames and Ids. You then use those as inputs to a QuickChoice control. When the user makes their choice, you use a couple of additional utility actions to extract the Layout fields for the layout that corresponds to the combination of… Read more »

catmacey
Guest
catmacey

I don’t seem to be able to install this in production. I get a “Mismatching Versions. This app can’t be installed.
There are problems that prevent this package from being installed.” Error.

Production is running Winter ’20 Patch 15.22
I can install in in my Sandbox which is running Spring ’20 Patch 5

Should I try installing the older version 1? If so will Flows from sandbox that use 1.1 work when deployed. (I’m guessing not)

Heath Parks
Guest
Heath Parks

I tried to install this in my sandbox (spring 20) and I got a couple of Apex Compile Failures.

1. Apex compile failure
Apex class ContactTrigger: line 3, column 9: Invalid type: ContactBeforeUpdate

2. Apex compile failure
Apex class ContactTrigger: line 6, column 9: Invalid type: ContactAfterUpdate

I am NOT a coder just a point and clicker, so not sure what this means, I know it has something to do with the apex code, but other than not, I got nuttin.

Any suggestions?

Justin Baker
Guest
Justin Baker

That looks like an issue with your Sandbox. You have a Trigger named ContactTrigger that’s firing those errors on the install. Is your sandbox configured to install via apex? Not sure why a ContactTrigger would have popped like that otherwise.

Heath Parks
Guest
Heath Parks

Yep, after I posted this, I looked at my Apex Triggers and saw that we still have/had an old contact trigger bit of code that was deactivated about 3 years ago or so, when I replaced a lot of actions with Process builder. I had not realized that I hadn’t deleted it. I did that and it installed correctly. Thanks for the quick reply! Learning a ton about flow and this site, great stuff!

Joshua Petre
Guest
Joshua Petre

Hi Alex, how can I show a field of the the Parent Object:
For example: Object specified=Opportunity, field to show “Account.Name”.

Thanks in advice for your answer.

Arvind
Guest
Arvind

The automation that this component brings is amazing! Thank you for creating this flow component. Please share if there is a way to introduce spacing between the fields or add section separators? Thanks.

Marty R
Guest
Marty R

Yes this is very needed so that we can make the screen look as close as possible to the page layout and it is visually friendly to the user.

David Rabizadeh
Guest
David Rabizadeh

Is there a way to finish the flow on save? Then I can hide the footer and force the user to make the required update/record creation. Right now, they could accidentally finish the flow without saving any update to the record.

Eric Smith
Guest

I’ve sent up a Pull Request for the following enhancements I’ve made for this component:

Added on option to display and handle a Cancel button when in Edit mode
Added an option to support flow navigation on record save and cancel
Included descriptive labels and help text for Flow parameters

J Baker
Guest
J Baker

Eric and Alex, the 1.2 (and 1.3 commit) updates are fantastic!

Ed Poorbaugh
Guest
Ed Poorbaugh

In everyone of the input boxes on the components Properties I am getting error message “The data type of the resource you entered isn’t compatible.” What’s weird is that this is occurring in flows that I build yesterday and that are running using this component. I even opened the test flow from the package and simply clicking into one of the property boxes I get this error message.

Heath Parks
Guest
Heath Parks

More of a general question, but do you all think with the direction SF is heading in giving us greater control to of what users see outside of just page layouts, do you think that would reduce the need for things like record types in some cases?

I mean, with this component and with the new feature touted at Dreamforce, page layouts don’t seem to matter as much when you have to “hide” fields from certain users.

I know this probably isn’t the place for this discussion, but you all seem smart, so just wondering..

J Baker
Guest
J Baker

Record types serve a purpose beyond field display, but I do think we’re moving away from them being used to show fields we want to show and more towards them being used for specific functions. Already, I’ve done away with Record Types on a variety of objects and use components to display just what I want displayed/editable.

Heath Parks
Guest
Heath Parks

I can totally see that. I am currently working through some updates to how we track employments for the clients we serve at the nonprofit I work with and I was leaning to different record types, but the more I think about it, the overall process is the same (at the time of this writing anyway) so if it’s just about who sees what… Even after working in the SF ecosystem for 4 years now, there is so much to still learn..

J Baker
Guest
J Baker

Probably my favorite part about working in the Ecosystem is how often it changes, it’s a constant treadmill of learning and it broadly appeals to my ADD that I can never say I’ve ‘completed’ learning on a topic.

I use screen flows to replace record pages entirely and have toggles to allow editing (which loads a different screen) using this particular component along with a few others spun up for this. It’s worked out great and hasn’t hit any roadblocks yet other than time on it vs other projects.

Heath Parks
Guest
Heath Parks

I would love to know more about using screen flows to replace record pages.

I have been testing that out a bit myself, but I am still pretty new to flow, and the learning curve can leave little time for my “real” work…Good to know, that screen flows are being used like that…very cool. I am not a coder but still good to know.

Anonymous
Guest
Anonymous

If you use the component to create a new record, is there a way to get the new record’s ID back to the flow for further manipulation?

Alex Edelstein
Admin

Yes, see the table above. recordId is available as an output.

June
Guest
June

Could you help me understand the functionality of the cancel button? If I’m reading correctly you can set it to previous or next. What value to I use for previous? What value do I use for next? I could love if cancel would not save the record (cancel/next seems to still save) or event better the ability to remove the cancel button all together.

Chris Manick
Guest
Chris Manick

Hi Alex, I’m super excited about this package. However, an included LWC (toastMessage) has the same label as one in a number of Salesforce packages, and so I’m unable to install. Is there any way this component could be renamed, or do you have any workarounds? Thank you in advance!