Salesforce Apex Master Class (Ep. 30) - Collection Iteration Best Practices

Поделиться
HTML-код
  • Опубликовано: 31 окт 2024

Комментарии • 7

  • @SliceOfSampai
    @SliceOfSampai Год назад +1

    Just finished your entire Salesforce Apex Master Class video series. Thanks a bunch for your dedication!

  • @gavin0729
    @gavin0729 9 месяцев назад

    best salesforce class ever!

  • @pedroprada1
    @pedroprada1 Год назад +1

    Happy New Year Matt, Thank you for continuing to add to this playlist....

  • @cristiaan3003
    @cristiaan3003 Год назад

    Thank you for sharing this videos with all !!

  • @chithraprakash8392
    @chithraprakash8392 Год назад

    Thank you for sharing this great video. Can you please upload videos on each of the concepts you mentioned in this video, nested for loopand querying inside a for loop(what should I use in this scenarios). Very useful video.

  • @extremeweirdness1528
    @extremeweirdness1528 Год назад +1

    I had a question on the for loop part. You said to avoid nested for loops right. I have a similar opinion though but I could never really test it.
    Suppose you have a trigger handler for account and there are 50 methods that do something on those accounts. We usually pass in the Account list and iterate over each one in a for loop.
    Instead what if we cut down those 50 methods to take in a single Account instead of a List of accounts. Now we would only need two for loops. We can have one big for loop that passes a single Account in each of those 50 methods.
    Now this is not going to make any improvements for one Account but what if you have 50 Accounts. You would have had to iterate over 2500 times instead of 100 thats a 25 x improvement by not bulkifying your methods and just having one big for loop.

    • @anthonybarrow3396
      @anthonybarrow3396 Год назад

      Not sure I understand your theory but do remember the SF limit is on the number of SOQL and DML statements and not the number of iterations. By not bulkifying you will hit SF governor limits in dataload scenarios