hide ui action button using client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2023 06:19 AM
we have a requirement to hide ui action button form one table in some conditions
when state is InProgress and
the logged in user is same as approver or coordinator (approver and coordinator are two fields in the record)
or logged in user is having admin role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2023 06:44 AM
Hi Roxi,
Instead of client script we can easily hide the button using condition field in UI action
Regards
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2023 07:26 AM
Hi @Roxi1 ,
there is no need to use client scripts, as UI policy can easily do the job by utilizing the condition builder - hence you do not need to add a script.
if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2023 07:46 AM
@Roxi1 ,
Please try this type of mechanism to hide/show UI action:
state==3 && (gs.getUserID != (current.approver+"" || current.coordinator+"")) || gs.hasRole('admin')
If my answer solved your issue, please mark my answer as ā
Correct & šHelpful based on the Impact.