Loops in Salesforce – For Loop

AGENDA

  • Different Types of Loops
  • For Loop in Salesforce
  • The different way to develop for Loop

Types of For Loop

Salesforce Supports 3 Kinds of For loop

  • Traditional For Loop(like Java)
  • The List or Set Iteration For Loop
  • The SOQL For Loop

Traditional For Loop

for (init_stmt; exit_condition; increment_stmt) {
  // Code block
} 
  1. init_stmt
  2. Exit Condition
  3. Code Block
  4. Increment Statement
  5. Repeat Step 2,3 & 4

The List OR Set Iteration For Loop

for (datatype variable ; list_or_set) {
  // Code block
} 

Here is the Recording for the same

If you have any query or any suggestion you can message me @cloudyamit OR you can email me @sfdcpanther@outlook.com

Happy Learning πŸ˜‰  Sharing is Caring πŸ™‚

#SFDCPanther #BAM

Leave a Reply

Your email address will not be published. Required fields are marked *