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

Gustav Aldenbra
Kilo Sage

Hi @LaraReddy 

 

this is what I use in my instance and it works as expected

 

 

var currentUser = gs.getUserID();
var groupManager = current.manager.toString();
var isAdmin = gs.hasRole('admin');


if (currentUser !== groupManager && !isAdmin) {
    answer = true;
}

 

Hi Gusthav,
Thanks for the response.
We tried your suggestion and but still the group managers are not seeing the edit button. [Refer below images]

LaraReddy_0-1708608403609.png

 

 

LaraReddy_1-1708608454492.png

 

 

The sys_user_grmember table as no 'manager'. You would need to dotwalk to the group.manager.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi Mark,

Tried your suggestion but still no luck.

var currentUser = gs.getUserID();
var groupManager = current.group.manager.toString();
//var groupManager = parent.group.manager.toString();
var isAdmin = gs.hasRole('admin');


if (currentUser !== groupManager && !isAdmin) {
    answer = true;
}

LaraReddy
Tera Guru

Hi @Ankur Bawiskar ,

Could you pls help us here.

Thanks.