omit edit button in can read related list of knowledge base table for all the users except owner
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
omit edit button in can read related list of knowledge base table for all the users except owner (its a field on the knowledge base table) and ownership group (its a field on the knowledge base table) members
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @sonalibhaga ,
- Open any Knowledge Base record.
- Go to the Can Read related list.
- Right-click the list header and select Configure > List Control.
Create the condition script
Now you will add a script to the Omit edit condition field (if not found in form, configure -> form layout ). This script will evaluate whether to hide the "Edit" button for the current user.
- Navigate back to the List Control for the Can Read related list.
- In the Omit edit condition field, enter the following script.
javascript
// Check if the user is the owner var isOwner = gs.getUserID() == parent.owner; // Check if the user is a member of the ownership group var isMember = gs.getUser().isMemberOf(parent.ownership_group); // Return true to omit the button if the user is neither the owner nor a member if (isOwner || isMember) { return false; // Show the button}return true; // Hide the button
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP