March 2017
Beginner
358 pages
9h 51m
English
With a single argument, that argument is assumed to be an encoded query:
var gr = new GlideRecord('incident'); var encodedQuery = 'assigned_to.active=true^active=true^ORstateIN1,2,3'; gr.addQuery(encodedQuery);
With two arguments, it is assumed that the first is a field name, and the second is a value to compare that field's value to for equivalency:
var gr = new GlideRecord('incident'); gr.addQuery('number', 'INC0012345');
With three arguments, the first is assumed to be a field name, the second is an operator, and the third is a value to compare the value of the first to:
var gr = new GlideRecord('incident'); gr.addQuery('closed_at', '>', gs.nowDateTime());
Or you can use the CONTAINS operator:
var gr = new GlideRecord('incident'); ...Read now
Unlock full access