Adding Sets To Complicated GlideRecords

Recently I discovered a little trick with GlideRecords that would’ve made my life a lot easier with previous projects if I knew it existed.

As it stands, out of the box, the GlideRecord API does not support query sets. Consider the following example where you want to bring back the following:

All users whose name starts with A and are active


All users whose name starts with B and are inactive.

So how can we accomplish this? Without further ado, let me explain…
Continue reading