Disabling Form Button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 05:54 AM
Hi Community,
I am working on a form which already has a customized button using UI Actions. When a new record is created the state is new and an approval will be automatically generated to the assigned group's manager, and I want to disable that button until the manager approves the request, I tried using a client script to get control over the button and disable it until the approval is set to approved but it didn't work. Can anyone suggest me a way to achieve this?
I attached the script used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 08:31 AM
Does the record change to a certain state once it is approved? If so, you could add a condition on the UI action. For example, if the record changes from "New" to "Approved", you could add current.state == 'Approved' as a condition, and then the UI action only shows when the record is approved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 02:59 AM
No, the record does not change the state when the approval is approved. It just has to be able to change the state, the state changes when the user clicks on the button I mentioned and what is want to do is to disable that button until the approval is approved.