function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
scorpiodsuscorpiodsu 

Flows - Automatically store all fields not work?

Hello All, 

I am trying to create a flow that clones all of the fields of an existing case.  I am running into an issue with the 'Automatically store all fields'  option in the Get Records element.  This automatically creartes the record variable.  I then reference the record variable in the Create Records element to use.  However, when the record is cloned, the data isn't added to the newly created record.  But if I individually select all of the fields to store, this works fine. 

So is there another step I am missing for the 'Automatically store all fields' option to work correctly?  I don't have an assignment element because I'm just going straight from getting the existing record to creating the clone.  No additional logic.  Any help is appreciated as I rather use this option than selecting individual fields so the flow doesn't have to be updated every time a new field is added to the object.Get recordcreate recordflow
Irina Clington 2Irina Clington 2
Hi,
You need to use a subflow to actually create the record.
https://admin.salesforce.com/blog/2020/duplicate-a-record-with-lightning-flow-in-spring-20
Kind regards
MelodyLMelodyL
Hello! This is made available now in the Flow Builder, so your flow should be working like this. (Please refer to page 106 in the official guide (https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/salesforce_cloud_flow_designer_guide.pdf))

By the way, I have a blog teaching flows and I help to build solutions for free. Check this out if it's relevant to you :)
https://salesforce-flowsome.com/
Antal Godkewitsch 8Antal Godkewitsch 8
'Automatically store all fields' is a misleading term. It will actually only query all referenced fields in the flow. Using a subflow works, because then the flow cannot (easily) determine what fields are referenced.

You best option here is probably to select the 'Choose fields and let Salesforce do the rest' option in the Get Records element