UI action to be disabled after executed once
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2023 08:17 AM
Hi friends,
I was thinking of one requirement.
After clicking the UI action the code in UI action is executed, it creates a record in another custom table. Then control should return to the same page ----- this requirement is completed.
1. Now, when the UI action is executed successfully and record created to another table, then UI action should be disabled.
2. When the UI action is executed un-successfully and record is not yet created to another table, then UI action should not be disabled. So that user can correct some input fields and use the UI action again.
Please suggest an approach to implement this.
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2023 08:24 AM
Hello @Asmita7 ,
You can add the conditions to your UI action to check whether the current record has any existing record in the another table from which the UI action is creating the record in it.
And if that record as its associated record in another table, you can just 'Hide' that UI action using the condition. And if the record do not have its related record in another table, you can make that UI action to be visible on that perticular form only so that the UI action will be executed successfully to create a new record in another table.
If above answer resolve your issue, Please mark the solution as 'Accepted Solution' and also mark it as 'Helpful'.
Thank You!
Prathamesh.