Hide/show buttons with list control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 08:28 AM
Hi there,
I'm trying to hide or show buttons and links from related list so I have tried with scripts in 'omit conditions'.
The requirement is very simple. Users, who have ACL write permissions for parent record, should be able to create or edit related list records.
I have achieved to hide links for users that have no permissons but it's not working with the 'New' button
This is the script which I have write for both conditions:
var omit = true;
if (current.parent.canWrite()) {
omit = false;
}
answer = omit;
and as I mentioned it works for 'omit links' but not for 'omit new'
Any suggestion?
- 877 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 08:47 AM
try this:-
var omit =false;
if (current.parent.canWrite()) {
omit = true;
}
omit;
Regards,
Ranjit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 09:28 AM
I appreciated your helpful but it doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 08:55 AM
I do have similar question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 09:11 AM
I have not found the solution yet. Please, let me know if you find it. It's strange because the script I wrote, works correctly for "omit links condition" but not for "omit new condition".