Hide a field in a form for certain users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 05:34 AM
Hi Team,
I have a requirement on Risk Event table in GRC: Advanced Risk scope.
As a Risk manager and Risk user, I want to hide a 'xyz' field and this field is created in GRC: Compliance Case Management Scope.
Code:
function onLoad(){
var userRole=g_user.hasRole('sn_risk.manager');
if(userRole == true){
g_form.setDisplay('xyz',false);
}else{
g_form.setDisplay('xyz',true);
}
}
Thanks,
Monish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 07:20 AM
Hi,
This is one of the options, but you can also consider a read ACL.
If you create an ACL with the following conditions, it should work as well.
Type = Record
Operations = Read
Name = Risk Event table.xyz (First field = table, second field = field)
Roles = sn_risk.manager
Something like this:
Hopefully this helps.