Example usage

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'); 
gr.addQuery('number', 'CONTAINS', '123');
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.96.247