Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How do you skip the iteration when the Apex loop breaks and then continue?

Asked by Danna Sahi Aug 30, 2023 1.2K views 1 answer
Share

About this question

I need to distribute several object records to users. I want to spread each record to two users who are inside ‘assignmentList’ based on the inputted maximum call line they can manage. My condition is if their inputted max amount - total distributed record amount is greater than 0. I tried to loop the records and looped the assignmentList for each record. But the problem is whenever the user hits the maximum amount, the continue does not skip. As a result, the record is fixed to the first user. So, my question is, how can I skip the iteration happening in ‘continue’?  

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.