How can we restrict reference field values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In the incident form there is a reference field configuration items, which when open from incident form then we can see 3000+ CIs. How can we make it in such a way that for users with not admin role should be able to see only those CIs whose class is Computer only?
I tried the below query in the reference qualifier but it didn't work.
Reference field : Configuration item
Use reference qualifier : advanced
javascript:
var answer = '';
if(gs.hasRole('admin')){
answer = 'sys_class_nameISNOTEMPTY';
}
else{
answer = 'sys_class_name=cmdb_ci_computer';
}
return answer;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
try a Business Rule that runs 'Before' and for 'Query'. use your logic there, easy to debug.
