addEncodedQuery in Lower Case Results Are Strange Instead of Error

Rahul Priyadars
Tera Sage
Tera Sage

Hi All

 

in one my script i used below and results are as expected.

 

var incGr = new GlideRecord('incident');
var cn=0;

incGr.addEncodedQuery('active=true^reassignment_count>2');

 

Now i did this and it is returning all incidents instead of throwing syntax error.

 

var incGr = new GlideRecord('incident');
var cn=0;

incGr.addencodedquery('active=true^reassignment_count>2');

 

why i tested this in some of the env my junior developers used lower case method name resulting into more records fetched and it updated more no of records causing issue.

 

I tested both versions above and behavior with lowercase is really Strange.

 

Am i missing something here . Please put some light on this .

 

Regards

RP

5 REPLIES 5

Sohail Khilji
Kilo Patron
Kilo Patron

in javascript addencodedquery & addEncodedQuery are 2 diffrent things. if addencodedquery is given it will skip the whole line and continue with next line.

 

Hence this is bacause of case sensitivity...


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect