how to hide New button on related list for particular roles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 09:20 AM
i need to hide new button on related list for manager and employee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 10:58 PM
Hello,
In the native UI you can just add the or condition as below:-
answer=true;
if(gs.getUser().hasRole('rolename1')|| gs.getUser().hasRole('rolename2'))
{
answer=false;
}
But in the workspace as I had mentioned you cannot use the list control.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 11:39 PM
You can control the New button visibility from the List Control:
Go to your Related List > Right click > Configure > List Control
From here you can either use the "New roles" field and define the roles that should see the New button. You can also add necessary script under "Omit new condition" script block.
Regards,
Rana