- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello, I am having an issue with a Business Rule where the GlideRecord query is only working with active records on the sys_user table.
I am aware of the User Query BR on the sys_user table that automatically appends an addActiveQuery line so that inactive user records don't show up. My question is, what can I add to the below script to ensure that it will pick up on inactive records without having to modify that User Query BR.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JHPost , please try the following approach:
To ensure your GlideRecord query includes inactive user records without modifying the default User Query Business Rule on the sys_user table, you can disable Business Rules using setWorkflow(false) and replace get() with a manual query:
This approach bypasses the automatic addActiveQuery() added by the User Query BR, allowing you to retrieve both active and inactive users.
Please let me know if this works for you or if you encounter any issues.
Regards,
Anjal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JHPost , please try the following approach:
To ensure your GlideRecord query includes inactive user records without modifying the default User Query Business Rule on the sys_user table, you can disable Business Rules using setWorkflow(false) and replace get() with a manual query:
This approach bypasses the automatic addActiveQuery() added by the User Query BR, allowing you to retrieve both active and inactive users.
Please let me know if this works for you or if you encounter any issues.
Regards,
Anjal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
