Skip to main content

#Loop Variable0 discussing

Hi my awesome Salesforce Trailblazers!

 

I’m trying to use a Flow that triggers off an Oppty when it is set to Stage = Closed Won and then use a loop to find additional Oppty Records that have the same Property, Account, and Close Date listed, then from there, I want the flow to uncheck a Checkbox Field called Send Welcome Email on any additional Records that match the triggering Record’s Fields (listed out above), so that an Email Alert only gets triggered to send once vs. multiple times to the same Account.  Please help!  I’m at my wits end!  

 

Example: An Email went out and it sent 5x because there’s 5 different Opptys (bc it’s 5 separate Rooms), but it’s all for the same Account…  so it’s 1 trip for 1 person, but they booked multiple Rooms, so there’s multiple Opptys and I’m trying to solve for this with a Flow.

 

Thank you for your help in advance!

 

#Flow  #Loop Variable  

 

#Sales Cloud  #Flownatic

4 answers
  1. Sep 30, 2024, 9:11 PM

    Is your question about how to exclude the triggering record from the collection? If so, you can simply add another condition: id != $Record.id. Is your question about how to exclude the triggering record from the collection? If so, you can simply add another condition: id != $.

    This will ensure that the Opportunity which triggered the flow is excluded.

0/9000

Hello, 

 

I am currently having difficulty creating a loop in the flow builder. 

 

I am working on the Combine the Power of Process Builder and Flow Builder badge where I have to add a loop into the flow builder. In the directions, it gives parameters for the loop variable. But in my edit loop screen, there is no option for the loop variable. 

 

I have attached a screenshot of my edit loop screen. It is scrolled all the way down. 

 

Thanks, 

1 comment
0/9000

Flows Loop Variable assignment  is not working after change un Summer 20 Release.

 

Now no need to create flow variable separately.

 

How the Interview Started

Sudip Dutta (0052x000001ML0g) started the flow interview.

Some of this flow's variables were set when the interview started.

opportunity = Opportunity (0062x000005492IAAQ)

 

ASSIGNMENT: Update_Opportunity_Fields

{!opportunity.StageName} Equals Prospecting

{!opportunity.CloseDate} Equals {!ninetyDays}

{!opportunity.Name} Equals Flow Test New

Result

{!opportunity.CloseDate} = "October 22, 2020"

{!opportunity.Name} = "Flow Test New"

{!opportunity.StageName} = "Prospecting"

 

FAST CREATE: Clone_Opportunity

Create Opportunity records using the values that are stored in {!opportunity}.

Variable Values

[Id=0062x000005492IAAQ,StageName=Prospecting,CloseDate=10/22/2020, 5:30 AM,Name=Flow Test New]

Result

All records are ready to be created when the next screen, pause, or local action is executed or when the interview finishes.

 

LOOP: Iterate_Over_Products

End Loop.

 

FAST CREATE: Clone_Products

Create OpportunityLineItem records using the values that are stored in {!oppProducts_new}.

Variable Values

None.

Result

All records are ready to be created when the next screen, pause, or local action is executed or when the interview finishes.

0/9000

Hi everyone,

 

I am getting the following error message while verifying the "Build Logic to Reassign Accounts" challenge - "sObject variable 'accountLoopVar' isn't properly configured. Check the instructions.

Link: https://trailhead.salesforce.com/content/learn/projects/flow_reassign/flow_reassign_reassign

 

With Summer 20 release, loop variables cannot be created, Salesforce automatically creates it as per the release notes (https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_forcecom_flow_fbuilder_auto_output_loop.htm). 

 

In the challenge, 'accountLoopVar' is no longer needed in the flow as Salesforce has created this loop variable - 'Current Item from Loop Reassign_Accounts' automatically. Hence, the above mentioned error is encountered. Also, In the loop element, there is no longer the field - 'Select Loop Variable' where we used to select our own resource variable.

 

I have logged a case with Trailhead, letting them know about the problem. Does anyone know how to bypass this problem and complete the challenge?

0/9000

Im having trouble accessing newly created variables in Flow.  I have had to go back and create a flow a couple of times in order to get them to be found.  Specifically when I am trying to pull in variable fields that are obtained in Get Records into a text template and when I try to create a new Loop Variable.  Is there something Im doing wrong?

5 comments
  1. Jan 28, 2020, 11:25 PM

    Thanks for the video, that clears the air.

    Since your getRecord is getting ALL records this instructs flow to place it into a collection. You'll need to loop through all the records and add the fields you want into a variable.

    See video on how this can be done (no audio):

    https://www.screencast.com/t/7QbVgcKH4LVp

    I used a screen to show how the text will show up.

    Steps:

    Get record

    Loop

    -Add your collection to the loop and create a record variable to loop the records

    Assign Variable

    -Create a text variable and add the fields you want into the variable

    {!varInfo} ADD {!

    loopVar.Name

    }

    -I added the {!varInfo} ADD <br> to create a break between accounts

    Text Template Variable will house the {!varInfo} variable to display the information you want.

    Let me know if you have further questions or are unclear on some steps in the video.

0/9000