addEncodedQuery()
- Builds SQL select statement (not seen by the user)
- Passes all query where classes as a single argument
- Best option for complex queries
glideRecordObject.addEncodedQuery('where clauses');
myObj.addEncodedQuery('approval = approved^assigned_to = 681b365ec0a80164000fb0b05854a0cd^Orassigned_to=f298d2d2c611227b0106c6be7f154bc8^ed_dateONThis
year@javascript:js.beginningOfThisYear()@javascript:js.endOfThisYear()');
Although this example looks overwhelmingly complex, it is easy to build the where clause(s) using the condition builder.