+ Start a Discussion
Varun Aggarwal 34Varun Aggarwal 34 

How to create multiple child records on a single screen in a Lightening FLOW.

Hi guys, so the scenario for my requirement is like, I have two objects :
1. Agreement (parent object)
2. Agreement Line item (child object).

On the first screen of flow, I am creating Agreement and on the second screen after creating an agreement record I want to create the Agreement line item in which we are using the ID of the agreement created on 1st screen. What I want is to create multiple ALIs on a single screen with an option or button there which ask to create more agreement line item. 
I want a screen of this type as I shown below table
Can we achieve this type of requirement via FLOW

Realated AgreementFiled 1Field2 Field3Product (Lookup)
Demo Agreement-1abc xyzsdfProduct -1
Demo Agreement-1abc xyzsdfProduct -2
Demo Agreement-1abc xyzsdfProduct -3
Demo Agreement-1abc xyzsdfProduct -4
Demo Agreement-1abc xyzsdfProduct -5
Add More Products (Button)    
  Previous Finish

ShirishaShirisha (Salesforce Developers) 
Hi Varun,


You can achieve this with the flow but instead of creating the button(Add more) you can create the checkbox,if the user clicks on the checkbox then they will be able to add an another record.

Please find more information in the below thread to proceed further.


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Varun Aggarwal 34Varun Aggarwal 34
Hi Shirisha, 
Thanks for your instant reply, but your suggested link takes me to the same screen again and I again have to enter details for my record.
My requirement is like whenever user wants to create more record then simply a new row will be generated on the same screen and user only select the desired field (as I have shown in my question above).
Herish SurendranHerish Surendran
Hi Varun. If you want to use add button then you have to use aura component to developer like what you want, since there is no such option to develop it in flow builder. But if you are fine with what Shirisha said (in Flow builder), then you can have screen with fields for Agreement Item and once you fill the details have them added to Object List. If user still want ot add another Agreement item, them loop the flow back to that screen. Once they are done with that, use create object component to create all the records.
Varun Aggarwal 34Varun Aggarwal 34
Hi Herish, 
Can we achieve my requirement using aura component I.e on clicking add button a new row will be there on the same screen and we just have to add product. 
If yes, then, can you please suggest me how to implement aura components. I am new to this flow things