September 2017
Intermediate to advanced
408 pages
9h 25m
English
Unlike addQuery, when using the addNullQuery method, we do not have to specify the operator and filter value. It is used to query records that contain NULL values. The following example will return all records stored in the incident table where the short_description field is NULL. While the addNullQuery method is used to build the search filter for the database operation, the query() method is used to trigger the database operation:
var gr = new GlideRecord("incident");
gr.addNullQuery('short_description');
gr.query(); //executes the query
Read now
Unlock full access