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
Dorien Moon 3Dorien Moon 3 

Flow to create multiple records

Hi there, I am trying to create a flow that will create multiple oustom object records when an opportunity is closed. 

There is a field on the opportunity that calculates how many records need to be created. Where do I start? I think i have the Assignements estabished and the Sobject collection variable created, I cant fgure out how to initiate the flow.

We should really hire someone to do this, but there is no budget. 

SandhyaSandhya (Salesforce Developers) 
Gaurav HandooGaurav Handoo
Hi Dorien

Assuming that the flow you have created is an "Autolaunch Flow", you would need to create a Process Builder on Opportunity Object running on Create and Edit of the same. It's running criteria would be to check if the Opportunity Stage has changed and is currently Closed, while the action would call the flow that you have created, where in you would pass the Opportunity Id and all related fields to the flow for execution.

Hope this helps. Please mark as best answer if it does.

Cheers!!
Gaurav