The State of Approval automatically change to Requested

CrysZzz
Tera Expert

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:

CrysZzz_0-1695952481307.png

And this is my workflow, I am not sure that this has relation on this issue or not

CrysZzz_1-1695952650364.png

 

 

 

 

 

 

 

 

 

 

 

 

 

5 REPLIES 5

Harish KM
Kilo Patron
Kilo Patron

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?

Regards
Harish

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.

okay.Can you add the below line before currentApproval.update()

new Workflow().cancel(current);// to cancel the workflow
Regards
Harish

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.