Learn Salesforce Flows Training 3: Loops

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ส.ค. 2024
  • GREAT NEWS: My Udemy class on Salesforce Flows just got published. Get it on Udemy at $19.99 for a limited time. It is the best flow training online.
    Get the discounted Udemy link on my Twitter profile:
    / enginutkan
    In this third session, we focused on loops. I explained the concept of collection record variables. I created a looping auto-launched flow that updates related records inside a loop (not ideal but easier to explain). Then I modified this flow to update all records outside the flow. I changed the flow type to a record-triggered after-save flow. I showed another looping flow that created related records.
    Contents:
    0:00​​ Intro Video
    1:40​ Livestream Intro
    3:57​ Simple Loop Flow
    6:34 Variables
    10:32 Loop in an Autolaunched Flow
    50:05 Update (DML) Outside the Loop
    1:12:46 Loop in a Record-Triggered Flow
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 10

  • @mikebaran46
    @mikebaran46 3 ปีที่แล้ว +2

    The example, information given and explanations are great. Suggestion: show a slide defining the problem to be solved, then add the design approach and later, add conclusions. The verbal descriptions are good though I feel a slide or two would have helped.

    • @SalesforceBreak
      @SalesforceBreak  3 ปีที่แล้ว

      Sounds good Mike. Thanks for the feedback. And thanks for watching.

  • @SalesforceBreak
    @SalesforceBreak  3 ปีที่แล้ว +1

    The sound on the previous video was too low. I fixed the issue and uploaded again. This resulted in a reset of the view-count and a loss of likes and comments.

    • @ameensams
      @ameensams 3 ปีที่แล้ว

      To avoid repetitive updates on cases where the case duration have already been set. We could filter one of the Get Elements to only retrieve cases where the status is closed (we already did this) and case_duration Isnull = true.

    • @SalesforceBreak
      @SalesforceBreak  3 ปีที่แล้ว +1

      @@ameensams good point. Especially if you are using one single DML (update) to update multiple records with a record collection variable, there is not much a performance impact. However you would be updating the last modified date of these cases constantly, potentially also launching other automation unwillingly. This type of thinking will be great if you can see it at the beginning, or during a review after launch. Always use your criteria in the flow start element, get, and decision elements very well. Agreed.

  • @MH-jd8nt
    @MH-jd8nt 2 ปีที่แล้ว +1

    Hi Andy, Any idea why this flow works only in Debug mode? It fails otherwise.

    • @SalesforceBreak
      @SalesforceBreak  2 ปีที่แล้ว +1

      I am not exactly sure which flow, but my guess is that it is a flow that expects a recordId as input. So technically the flow does not fail when it is run, it just does not have a value assigned to the recordId it is expecting. And your run does not ask for it. You will need to call it from another flow or from the UI if it is an autolaunched flow and pass the recordId to it, then you will see it works the same.

    • @MH-jd8nt
      @MH-jd8nt 2 ปีที่แล้ว

      @@SalesforceBreak Hi Andy, It was the autolaunched flow that I was testing and you are right, I did not call it from another flow, I forgot that part. I just tested it and works fine. Thank you very much for your work! Your videos and explanations on flows are valuable and easy to follow. Much appreciated.

  • @ameensams
    @ameensams 3 ปีที่แล้ว +1

    @1:155 is there a reason why you removed AccountId from Get Closed Cases and replaced it with UpdatedCaseRecordVar.AccountId? The variable you replaced it with has been updated yet until it reached inside the loop. Why not use the $Record.AccountId instead. I'm just curious as to why?

    • @SalesforceBreak
      @SalesforceBreak  3 ปีที่แล้ว

      Excellent observation and question @Samsudeen. Now that I watch the recording after the session, the entry screen autofills with a different variable than the one I intended, since I have not edited and finalized my start element yet. The sequence of changes should be different. Edit the start element first, finalize it. Then do the other changes. When you go to pick the $Record.AccountId it will be available then. Currently since we never assigned the value for UpdatedCaseRecordVar.AccountId this flow will most probably fail as it is built. Thank you.