I hit a funny issue today with GlideRecord join queries. The code I was writing was similar to this:
This won’t work. It returns a set of records completely unlike what you would expect. So I tried a different tack, and it worked great but felt like more work than should be necessary:
But then through a series of unlikely events I realized that the first code will work just fine if you change the order of your addCondition() calls against the join table:
I’m still scratching my head over this one, but at least my code works now.