- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We have been trying to look into filtering for HR Cases in the Employee Centre. While looking at the My Request Filters, we noticed that there is a piece of Javascript which appears to not be running at all. See below:
I tried to go into hr_caseMyRequestFilterUtil which is what hr_caseOpenRequestFilterUtil is referring to and entered some gs.info lines into the code. None of them show up in the information logs so I am relatively convinced that the filters are not kicking off the Javascript. Is there any way to confirm if Javascript is not running on My Request filters? Because it looks like this OOB code is no longer running.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @tahnalos
We cannot add javascript code there. This filter is normally like other filters we see when trying to filter records in tables or adding filter condition in BR or UI policy.
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @tahnalos
We cannot add javascript code there. This filter is normally like other filters we see when trying to filter records in tables or adding filter condition in BR or UI policy.
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
This is an OOB filter, are you telling me that ServiceNow screwed up here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @tahnalos ,
In the filters we can't add javascript code like this. From the screenshot i can see that you are trying to filter some specific Sys_IDs. Solution can be - you can get the required sys_IDs using background scripts etc and then use these sys_Ids in the Filter.
If my answer helped you, please mark it solution accepted.
Regards,
Nikhil Bajaj
Regards,
Nikhil Bajaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @tahnalos ,
Please make sure that the Sandbox enabled checkbox is set as TRUE in your script include.
I have tried the same thing in my PDI with incident, and it worked, please find the below screenshots:
If this solution helps you then, mark it as accepted solution ✔️ and give thumbs up 👍!