addEncodedQuery in Lower Case Results Are Strange Instead of Error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 10:44 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2024 06:08 AM
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....