We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Encoded Query String not working

mark141230
Tera Expert

Hi Everyone,

 

Seeking your help please. I have created a notification triggered by an event. I intended to schedule the job to run daily.

Unfortunately it seems that my script where unable to grab the records using the query I provided which is got after I filter the record whose end date is today. Please see my script below:

var rec = new GlideRecord('resource_plan');
rec.addEncodedQuery('state=3^end_dateONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday');
rec.query();

while (rec.next()){
gs.eventQueue("resourceplanend.now", rec);
}

 

Thanks in Advance!

 

11 REPLIES 11

Kindly close the thread by marking appropriate reply as Correct & 👍Helpful.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi

Yes, please feel free to mark the best answer as correct 🙂

Thanks & BR

Dirk