Need to hide declarative action assignment button in workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 04:09 AM
Hi Community,
I have requirement in which I want to make buttons visible in change request form in workspace only when user logged belong to assignment group or he has change manager role.
I can manage the code if it was UI action but not sure how Declarative action code works or how can I add condition to hide it. I have configured it as below-
currently cancel button is visible for all user in action dropdown in workspace. Can someone please help me how to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 06:19 AM
@Ankur Bawiskar Hey Ankur any help on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 06:55 AM
did you try to debug the condition 1 by 1?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 09:23 AM
yes tried various conditions as well but don't know why it's not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2025 08:21 AM
Hello @Shubham Bongulw ,
Are you found any solution to isMemberof script condition on declarative action?
I did some tests and gs.getUserID() works perfectly for the assigned_to field, but the gs.getUser().isMemberOf condition does not work and allows anyone to have access to the action.
I'm testing in related list action to SOW with this condition: (parent.active == true) && gs.getUser().isMemberOf(parent.assignment_group)