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
JHobbs85JHobbs85 

Flow and Matrix Tables in VF Pages

I have a use case for which we would like to be using Flow as the medium so that questions can be easily updated in the future. It is essentially a wizard for creating data across a few different objects - all related to a single Parent where we have some simple approval processes in place. 

The issue I am trying to get my head around is how Flow can interact with a single/multiple VF Pages where we are rendering existing 'template' records and providing the user with the ability to select these and/or create new rows. We are talking simple VF tables with 4-5 columns consisting of picklist type data but these occur across a few different objects. So as an example I have a Flow with 4 different Input Screens, and on the 2nd, 3rd and 4th I would like to combine these with a VF Components which will allow the user to validate and create/add more rows to different child objects. 

The ID's of these are not required further down the line with the Flow so I don't think we need to worry about limitations with collections support etc, just need to know whether we can use Flow or whether we will need to go completely VF/Custom Controller route...

 

Thanks!

Jeff MayJeff May

In the Flow Designer, you can create many different RecordLookup elements, each looking up the record you need. For example, a Flow that starts on an Contact, might have a RecordLookup for the Account associated with the Contact, and another RecordLookup for the User who owns the Contact. In each RecordLookup, you can save one or more fields from the record you found to a variable, then display these variables on your Flow screens.   If there is data updating, you can do RecordUpdate elements the same way, using variables from your Flow. 

JHobbs85JHobbs85
Hi JeffM, Thanks for the reply. Just to clarify I am creating/updating a single header (parent) record within my flow and as part of my steps create multiple related records. The creation of multiple records in each step is across a single or potentially multiple (Grandparent - Parent - Child) objects would need to occur in a single screen in a tabular format. This way from the end users perspective, these can be created and saved at each step in a single transaction.
I believe that the solution you have proposed would require me to have a flow process for each of the 'child' records, which is unfortunately impractical for the data we are trying to capture!
Jeff MayJeff May
You are correct. If you need to update records in the middle of the screen, I am not sure that can be done since it would require a RecordCreate and or RecordLookup in the middle of screen processing. I suppose there might be some way to tie in Apex code components, but at that point you might be very close to writing the whole thing in VF and Apex controllers. Hmm, I wonder if anyone's tred mixing flow screens and displaying VF pages among them somehow.
JHobbs85JHobbs85

I know you can tie in and refer to controllers for processing work, as well as embed these flows in VF Pages but exactly what you have said is what I am trying to determine! If it has been done it will definitely be a great time saver for futureproofing what we build!