logo

NJP

To avoid disasters, always validate your queries.

Import · Apr 14, 2023 · article

A while back I posted about how dangerous .get() on GlideRecord could be if you didn't validate the query.

That got me thinking about addEncodedQuery...

For those who've already created the glide.invalid_query.returns_no_rows property, its still a good practice to validate your query, especially if the rest of your code is assuming a query return greater than 'no rows'

View original source

https://www.servicenow.com/community/developer-articles/to-avoid-disasters-always-validate-your-queries/ta-p/2534775