ui action visibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 04:58 AM
Hello everyone,
I have created a UI Action on knowledge article form.
This UI action should only be visible when logged in user is (member of ownership group or manager/S) of that PARTICULAR KNOWLEDGE BASE and also when workflow state is draft and version > 1.....
Thanks everyone,
Ak**bleep**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 05:20 AM - edited 09-20-2024 05:22 AM
Hi @Snow-Man on your UI Action condition field add below code. Modify accordingly
current.state=='1' && gs.getUser().isMemberOf('your group sys_id')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 05:30 AM - edited 09-20-2024 05:30 AM
Hi @Snow-Man
You can add condition in your UI Action.
1. To check if user is part of group or not then use :
gs.getUser().isMemberOf('your group sys_id')
To check in Managers field, You can add below check
current.managers.indexOf(gs.getUserID()) > -1
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 05:33 AM
sysid should be dynamic, as it will be different for different knowledge articles as their knowledge bases are different
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 09:34 AM
You can use current.kb_knowledge_base.filedname to get dynamic sys_id.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP