Some commenters on my recent LinkedIn benchmark post were asking about the performance of getting all fields automatically in a Flow’s “Get Records” action or getting only the fields needed. I commented that I’d expect that getting only the fields needed would be faster than getting all the fields, especially if there are a lot of fields on the Object. Another commenter said no Salesforce only actually grabs the fields needed even when “Store All Fields” is chosen except when the record(s) are passed to a sub-flow and this forum thread was referenced.
This led me to research how does the “Automaticlly store all fields” option in a “Get Records” element work. Before you continue, what do you think it does?
A custom object was created with 500 custom text fields each with 255 characters. A screen flow was created with a single Get Records that had the “Automaticlly store all fields” selected and was set to get the first record found without any criteria.
Next, the “Debug” button was clicked and the flow was ran. This outputs the fields queried in the debug output which helps answer which fields will be queried or not.
The Debug Details show only the Id field was queried and not all the fields on the Object! This seems to imply that only the fields referenced in the flow will be queried. Let’s check that out. Next a formula field is added to the flow referencing two fields from the record:
The Debug was ran again and here’s the details:
Id, Text_1__c, and Text_2__c were the fields queried. This means that only the fields referenced in the flow are used!! That’s great to know but doesn’t align with my interpretation of “Automatically store all fields” which is it’ll store all the fields on your behalf.
After further research, “”Automatically store all fields” does fetch all an object’s fields if the record(s) is passed as input to a sub-flow or an apex action!
The current Get Record Documentation doesn’t specify at a more technical level how it works. That needs to be updated!
Renaming the “Automatically store all fields” option to “Automatically store all used fields” or something else would be even better and updating the documentation to specify what the option does is needed too.
If there are any other Flow options whose behavior does something different than you expected, please share in the comments below!