Query Business rule to restrict record on list view
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2018 02:27 AM
Hi ,
I using this query to restrict records shown in a list view to non itil users.
The Query BR I has created on Incident table ,I have modified the script .
var userId = gs.getUserID();
var gr = new GlideRecord('sys_user');
gr.addEncodedQuery('sys_id='+userId);
gr.query();
if(gr.next()) {
var userEmail = gr.getValue('email');
if(userEmail != 'abc@gmail.com') {
current.addQuery('category', 'inquiry');
}
My intention is to show only those records which has the same email address on incident form.
if logged in user email address is abc@gmail.com(on sys_user), then he will only see incident
which has this email of abc@gmail.com on incident form else he doesn't see any record.
Please suggest a suitable query.
Labels:
- Labels:
-
Scripting and Coding
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2018 05:50 AM
Hi,
You have to create business rule on the incident table to restrict incident list view records.
Thanks,
Ravi

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2018 10:07 AM