- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 05:12 AM - edited 11-08-2024 05:14 AM
Hi all!
We have Business rule at sys_user table, that using "current.addActiveQuery()" if current user is not admin.
At one of our Catalog Items at Service portal we need to show all users, not only active.
Is there any solutions how to check where we are from BR?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 06:26 AM
It sounds like you have a query Business Rule. You can set your advanced reference qualifier to
activeANYTHING
preceded with a ^ if you are appending to an existing value.
In your query Business Rule, change the script to this, incorporating the admin check if that is in the script
(function executeRule(current, previous /*null when async*/) {
var query = current.getEncodedQuery()
if (gs.getSession().isInteractive() && !query.includes('activeANYTHING')) {
current.addActiveQuery();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2024 04:48 AM
Hi! Thanks for your solution. It works, but only with one field. At my Catalog item fields autopopulate with script after filling in user name. With this solution inactive user is visible in "name" field, that has qualifier, but all other field are empty
