The State of Approval automatically change to Requested
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 06:57 PM
Hi Experts, I have a problem when using UI action to change the state of Approval related to my record.
My UI action will change the state of Approval to Cancel when it is clicked, however, the state immediately change back to Requested. I cannot find out the reason of it. Hope to be helped.
Below is my UI action:
And this is my workflow, I am not sure that this has relation on this issue or not

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 07:02 PM
This is happening on which table?
I would check Business rule. Is there any BR setting approval to be requested.
what is the running activity on your workflow when you cancel the approval?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 07:14 PM - edited ‎09-28-2023 07:14 PM
Hi Harish, the UI action is on my custom table, I have tried to config it without extending from other table, so it does not have any specific BR or WF that would change my data.
Besides of it, the problem is not appeared when I change the state to Approved or Rejected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2023 07:42 PM
okay.Can you add the below line before currentApproval.update()
new Workflow().cancel(current);// to cancel the workflow
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2023 01:22 AM
Hi, thanks for your help, I have checked all my config due to your suggestion and found the reason. I have named the ui action id in gsftsubmit is 'cancel', I am not really know what's wrong with that name but the my UI Action does not execute the server-side block code. Besides of it, the state of the Approval is override by another script when update() called.