I want to add role to the buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:34 AM - edited 04-08-2024 05:35 AM
Hi,
We have one HR item, Buttons to be visible to users with this role. HR Support, HRIS, role called 'ABC_HR'.
I have created 'ABC_HR' role and added to the HR Support, HRIS groups to that role.
I want to show the buttons only this particular role users in HR item.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:43 AM - edited 04-08-2024 05:46 AM
Hi Mania,
1. Please navigate to System Definition -> UI Actions.
2. Open the UI Action record which you would like to configure and in the condition field of the UI action, add the below code to the existing condition.
gs.hasRole('ABC_HR')
If my answer has helped with your question, please mark my answer as accepted solution and give a thumbs up.
Best regards,
Tharun Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 05:49 AM - edited 04-08-2024 05:49 AM
Thanks for your Responding!
I have tried the same but not working.
Can you please give any alternative solution. It will be usefull.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 06:08 AM
Hi Mania,
You can also use gs.getUser().isMemberOf('HR Support')
Please ensure the your record looks similar to my record below.
There could be any error on your script which could cause the issue. Please ensure there is no error in your script or condition fields.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumbs up.
Best regards,
Tharun Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 06:14 AM