Scoped GlideRecord - isValid()

Determines if the table exists.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if table is valid or if record was successfully retrieved. False if table is invalid or record was not successfully retrieved.
var gr = new GlideRecord('incident');
gs.info(gr.isValid());
 
var anotherGr = new GlideRecord('wrong_table_name');
gs.info(anotherGr.isValid());

Output: true false