Skip to main content

I have a visual flow that creates individual quotes for each line item on the Opportunity. The user clicks a button, for each Opportunity Product the user inputs the field values for the Quote record, and then the flow creates a quote and assigns one product as the Quote Line Item. This loops through all active products found on the Opportunity.

 

This worked great when I had a "Record Create" action directly in the loop, but it breaks with over 100 SOQL calls if the Opportunity has several products, so I need to batch them and mass-create in 1 SOQL call.

 

In the loop, I have an "All in One" assignment for the Quote given the input, but I need to add a Quote Line Item to each of those quotes.

 

I think I need two "All in One" records, one for the Quotes and one for their Quote Line Items, but I don't know how to store the Quote ID on the Quote Line Item if the Quote doesn't exist yet..

 

Essentially, batch create quotes and batch create line items on each of those quotes.
1 个回答
0/9000