Hide the New button based on value in table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 02:50 PM
I have two tables, Project and Project Line. When the status of the Project is "Closed", I need to hide the "Update" and "Delete" buttons on the Project form, and hide the "New" button on the Project Line related list.
I have tried a related list to hide the "New" button and it removes it in all cases.
Any suggestions, and should I use a list control to hide the "Update" and "Delete" buttons?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 04:01 PM
Hello @Robert Hames,
I would suggest using ACL to stop Update and Delete operation on the tables.
Check if the record status is closed dont allow Update and Delete operation. You have to check all other ACLs running on those tables and whenever the state is closed, make everything read only.
The UI Action of Update and Delete already checks canUpdate(). so, if ACL doesn't allow, buttons will not be visible. This is a much safer option, security wise.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 03:44 PM
I did as you suggested, and put a condition on the Write ACL for the project table. It hides the "Update" button, but it also makes all the fields on the form read-only.
Is that a normal action when the Write ACL conditions are not met?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2023 03:59 PM
Hello @Robert Hames,
Yes. So, when write permissions are not met, all fields are read-only. And I think it makes sense and concretizes your case.
Best Regards,
Swarnadeep Nandy