omit edit button on group table level

LaraReddy
Tera Guru

Hi All,

we want that only the Group owner can see and use the "edit" button on the related list "Group Members". Therefore we edited the List control and added following omit edit button script.

But some reasons it's not working, can anyone please help us here.

LaraReddy_0-1708606725158.png

 

Advance thanks.



30 REPLIES 30

Hi Ankur,
The script is working fine but when the group manager hit the Edit button we're getting like "Action not authorized".

 

Is it because we're using the OOB UI Action or some other reasons???

 

Could you please help us here.

 

 

LaraReddy_1-1708684051293.png

 

Advance thanks.

 




Anubhav24
Mega Sage
Mega Sage

Hi @LaraReddy ,

 

Please uncheck the Omit Edit Button checkbox and then write your script. As far as I remember both checking checkbox and script work exclusively.

 

Please mark correct/helpful if my response helped you.

Hi Anubhav,
Thanks for the response.

We tried your suggestion, but the Edit option is not showing for group's managers.

LaraReddy_0-1708619717554.png

 




Hi @LaraReddy ,

Can you try one thing uncheck the checkbox comment your script and see if the Edit button is appearing or not , and then simply in your script try one condition like if user has admin role then make answer variable true or false if this much works then problem might be in the script you are trying.

 

Please mark helpful/correct if my response helped you.

Hi Anubhav,

We tried your suggestion and it's working fine for only admin role users.

Then we replaced the parent with current but we're having the below issue.

 

I mean let assume that if there is no users in group and if same group's manager opened the group to add the users , In this scenario the Edit option is not showing.

 

var currentUser = gs.getUserID();
var groupManager = current.group.manager.toString();
gs.log('manager: ' + groupManager + 'currentUser: ' + currentUser);
var isAdmin = gs.hasRole('admin');
if (currentUser == groupManager || isAdmin) {
    answer = false;
} else {
    answer = true;
}