Access to form based on group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2023 11:37 PM
i have 3 groups
Director
Junior and senior groups
if the user is part of director they should have access to see the cases which are assigned to director, junior and senior groups even though the director group members are part of junio /senior groups.
if (gs.hasRoleExactly('x_wms_directior') {
if (gs.getUser().isMemberOf(current.assignment_group.toString())) {
return true;
}
return false;
}
i tried this it's not working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2023 11:39 PM
HI @sasi ,
I trust you are doing great.
Please find the below reference code
if (gs.hasRoleExactly('x_wms_director')) {
// Check if the user is a member of the 'Director' group
if (gs.getUser().isMemberOf('Director')) {
return true;
}
// If not, check if the user is a member of 'Junior' or 'Senior' groups
if (gs.getUser().isMemberOf('Junior') || gs.getUser().isMemberOf('Senior')) {
return true;
}
}
return false;
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2023 12:19 AM
Hi Amith,
Thanks for the quick response,
here i have one more condition director may not be a part of junior/senior group. in that way hasrole condition will not match right?