Salesforce Apex Master Class (Ep. 29) - Collection Iteration in Apex (How to Write For Loops)

In this episode we go over how to iterate through collections in Apex, why it's useful, when to use it and we do an example of a normal and enhanced for loop together in Apex! Schedule Salesforce consulting time with me here: https://calendly.com/codingwiththefor... Please consider donating to help continue to improve the content produced for Coding With The Force: https://www.paypal.com/donate?busines... Get Coding With The Force Shirts Here: https://www.redbubble.com/people/Codi... Follow all of our social media here: Patreon:   / codingwiththeforce   Github: https://github.com/Coding-With-The-Force Facebook:   / codingwiththeforce   Twitter:   / coding_force   Instagram:   / codingwiththeforce   Salesforce development books I recommend: Advanced Apex Programming: https://amzn.to/3lXi8to Salesforce Lightning Platform Enterprise Architecture: https://amzn.to/2R0D4BQ Mastering Salesforce DevOps: https://amzn.to/3lTtTRN Apex Design Patterns Book: https://amzn.to/3DwqljP Good Non-SF Specific Development Books: Clean Code: https://amzn.to/35PuMDU Clean Architecture: https://amzn.to/35FYo6A Design Patterns: Elements of Reusable Object-Oriented Software Book: https://amzn.to/3LhvHBd ----------------------------------------------------------------------------------------------------------------------- Table of Contents: 0:00 - Intro 1:56 - Why is Collection Iteration Useful? 3:11 - Creating a Collection Iteration Example in Apex 11:29 - Demoing our Example 15:59 - Creating an Enhanced For Loop Example In Apex 20:18 - Demoing our Enhanced For Loop 20:53 - Outro DISCLAIMER: The views and ideas expressed on this YouTube channel and blog are based on past development experiences and may not always work for your particular scenarios. The advice in these videos may also become outdated as technology advances. They should be used as examples for educational purposes only. Using any shown solutions in your own org is not advisable since they are example scenarios. #salesforce #salesforcedeveloper #salesforceadmin