Script include for If current logged in user in member of assignment group

DeepikaR1661877
Tera Contributor

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);