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
sebascansecosebascanseco 

Loops in visual Flows. And, are Flows packagble?

Hi guys, two main concerns here:

 

  1. I need a Flow to be able to loop over a Create record step for N times. How could I achieve this?
  2. In the packaging guide in the Available components, the Flow isn't listed but later in the same document, in the Editing Components and Attributes After Installation section it is listed. So wha'ts the correct info?

 

Best Answer chosen by Admin (Salesforce Developers) 
RajaramRajaram
You can certainly loop in Flow. Just have a number variable, a decision element and an assignment element used to increment the loop - build your classic "while" loop.

That is a doc bug. Flows are certainly packageable. The sample pack bit.ly/flowpack would be a good example and a resource for you.

All Answers

RajaramRajaram
You can certainly loop in Flow. Just have a number variable, a decision element and an assignment element used to increment the loop - build your classic "while" loop.

That is a doc bug. Flows are certainly packageable. The sample pack bit.ly/flowpack would be a good example and a resource for you.
This was selected as the best answer
sebascansecosebascanseco
Thank you, sometimes the things are so obvious (loop thing) it's easy to miss them.

And indeed flows are packageable as you said. Thanks again.
Sam Pinizzotto 6Sam Pinizzotto 6
Rajaram,
Can you provide an example of this?
Also, if I call the flow from Process Builder, would I have the Loop to pause for a few(maybe 10) seconds, then create a record?
I'm trying to create an Incident for BMC Remedyforce and There is a timing issue with creating a task as an incident is created. Salesforce and BMC has told me that I need to use flows. The Wait Element in flows only have a minimum of 1 hour delay. I only need seconds or minutes.
I know what a while loop is, but not sure how to do it in the Loop Element.

Any help you can provide would be great.
Thanks,
Sam