User Query OOB BR
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 02:44 AM
Hi everyone! Do you have an idea on how I can except this OOB BR to not run on a specific catalog item? Please see my script below, I've tried to modify it but it doesn't work
var checkItem = gs.getProperty("CatalogItem");
var checkVar = gs.action.getGlideURI().toString().indexOf('66d528fb1b7cf1503620b6c5464bcbc7');
if (checkVar == -1) {
current.addActiveQuery();
}
My sys property below
Name: CatalogItem
Type: String
Value: 66d528fb1b7cf1503620b6c5464bcbc7
Thanks!
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 03:12 AM
Hi,
Check this,
Similar question is answered here.
Solved: Bypass query business rule for catalog variable - ServiceNow Community
-Anurag
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 03:22 AM
Hi @oww15,
please check below BR:
var query = current.getEncodedQuery();
if (gs.getSession().isInteractive() && !query.includes('activeANYTHING')) {
current.addActiveQuery();
}
Thank you, please make helpful if you accept the solution.