Script include for If current logged in user in member of assignment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 10:55 PM - edited 08-23-2024 02:57 AM
Hi all,
I have the one recruitment , when the current logged in user having the "xyz" role, and the assignment group also having the same role if the condition is match then UI action visible to the incident table. i have write some code for that it's working inside the form when i am using gs.log method, but user having the role and and they not part of the assignment group even though the UI action are visible, any one help on this?
checkActionableUIActionVisibility: function(sirRecord) {
if (gs.hasRole('sn_si.sap_lob_analyst')) {
var groupSysId = sirRecord.assignment_group;
if (gs.getUser().isMemberOf(groupSysId)) {
return true;
}
}
return false;
},
UI Action condition
new ABC_SecurityIncidentUtil().checkActionableUIActionVisibility(current);