I have a related action accessible to a number of users. The action will be hidden upon execution. If two users open the summary page at the same time, the first one to click it will be able to execute the action. Although the action is still visible on the second user, he/she will now get "An error Has Occurred. The specified <RECORD> related action does not exist or you do not have permission to view it".
Is there a way to handle this error to provide a better message?
Thanks.
Discussion posts and replies are publicly visible
Thanks Mike. I can't find a way to handle it in the process. Do you have the same scenario?
Let's say the action is "Approve Request" and it is visible when status is "Awaiting Approval". The first user who clicked the action will set the status to "Approved". The "Approve Request" button will remain visible to the second user who opened the summary page at the same time but the action is no longer accessible.
That's one of the reasons I asked what logic you're using - without knowing some more details I can only guess as to how you're disallowing visibility of the related action after the first user initializes it.
I suppose my first guess is that you're setting a DB value when the first user initiates the action. In this case, you simply need to add a query at the start of the process instance to check for the most up-to-date value and base evaluation of the subsequent gateway from that.
The visibility rule is stopping the user from getting into the process itself.
I just find the error message not friendly enough for the end users. This seems to be a very common scenario. I wonder if I am missing anything.
Yes - my whole point here is that you would reconfigure the visibility setting such that users are not prevented from having access to the related action itself (at least if they happened to load the related action list in time to already see the button/link). Then you can reroute the user to something as user-friendly as you feel like designing.
Thanks Mike.
Is this issue solved Vernon Pinawin
Hi Pramod, this is my workaround:
1. I hide the Related Actions Tab in the Record2. I set the visibility of the related actions to true in the record object3. I used recordActionField to display the action in the interface. I have an expression to determine which record action should show up.4. In the process model, I checked if the action is still valid before executing the rest of the nodes. If no longer valid, I display a prompt to show that someone updated the request and then refresh the summary page.