Scoped GlideRecord - getEncodedQuery()

Retrieves the query condition of the current result set as an encoded query string.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The encoded query as a string.
var gr = new GlideRecord('incident'); 
gr.addQuery('active', true);
gr.addQuery('priority', 1); 
gr.query(); 
var encodedQuery = gr.getEncodedQuery(); 
gs.info(encodedQuery);

Output: active=true^priority=1