how to hide New button on related list for particular roles

siva58
Tera Contributor

i need to hide new button on  related list for manager and employee.

 

siva58_0-1667319638129.png

 

11 REPLIES 11

Mike_R
Kilo Patron
Kilo Patron

Which related list?

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

If it is a related list please do the below:-

 

Right click on the column in the related list configure-> list control

 

Saurav11_0-1667327459921.png

 

If you want to hide it for everyone then mark omit new button checkbox as true:-

 

Saurav11_1-1667327563236.png

 

If it is based on role in the Omit new condition field write the below code:-

 

answer=true;
if(gs.getUser().hasRole('rolename'))
{
answer=false;
}
 

 

Saurav11_2-1667327717813.png

 

Please mark my answer as correct based on Impact.

siva58
Tera Contributor

It is working in native, but not working in workspace 

Hello

 

List control does not work in workspace. On workspace there is no way to control the related list  button through role. Either you can completely disable it or show it but cannot do it based on condition in workspace.

 

Please mark my answer as correct based on Impact.

siva58
Tera Contributor

Thank you, and how to restrict it for multiple role users.