Not able to use "addEncodedQuery()" function on client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 09:51 AM
Dear all,
I've written on submit script on catalog task table.
this script contain addEncodedQuery function.
this script is giving error while submitting as shown in screenshot below while closing catalog task.
Can someone please help me on it
Regards,
Surendra
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 09:55 AM
Hi,
Please post your full script. Can't help really without it.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 09:59 AM
Client-side GildeRecord is different from the Server-side one and has limited features. If you need to use encoded queries, I would recommend you move your logic to a client-callable script include and use GlideAjax to call it and get the results you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 10:13 AM
Hello Jon,
I've tried using this function on script include also.
But script is not serving its purpose, maybe I'm doing some mistake.
Could you please check scripts and suggest if I'm doing anything wrong here.
New to work on script include..
Requirement:
not to allow to submit task if affected ci which is related list of catalog task, is not selected.
This should be applicable for few catalog items and one of assignment group only which I'm mentioning in this encoded string
Script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018 10:04 AM
Hi,
Yes you can use.Cause of error may that gr is not a GlideRecord object.
Thanks