Hi,

Understood, do you really need to use GlideQuery here?

Still a good point to know how to break out of the forEach, I'm looking into it, but for all purposes, you can use GlideRecord and set condition with while loop and it'll break out easily.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!