cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Cancelling an approval in the CDS entity

Hi all,

 

I have a use case where an approval is sent and then chased twice, and then I need to cancel the Approval.  I know there is no specific way to cancel approvals, but I have been looking at the CDS Approvals entity.

 

I think I can update the approvals entity after I have chased the customer twice for approval, but failing to see where or how to do this.

 

Here is my flow:

 

Thanks in advance.CDS.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Cancelling an approval in the CDS entity

I've got an example where I do this as part of an escalation scenario where the original Approval is cancelled if the approver doesn't respond within a certain time period. What you need to delete the Approval is the ApprovalID of the original Approval.  You use the Delete a Record action in the CDS connector.  Here's a screenshot of mine

screenshot.png

Note: this will delete the actual approval, but does not delete the approval email that was sent.  There is no way to do that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

8 REPLIES 8
Highlighted
Dual Super User III
Dual Super User III

Re: Cancelling an approval in the CDS entity

I've got an example where I do this as part of an escalation scenario where the original Approval is cancelled if the approver doesn't respond within a certain time period. What you need to delete the Approval is the ApprovalID of the original Approval.  You use the Delete a Record action in the CDS connector.  Here's a screenshot of mine

screenshot.png

Note: this will delete the actual approval, but does not delete the approval email that was sent.  There is no way to do that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Helper V
Helper V

Re: Cancelling an approval in the CDS entity

oh wow, nice, where would that go in my flow ?

 

Do I need to break up the start and wait for an approval to be create and wait for an approval ?

 

Thanks for your reply.

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Cancelling an approval in the CDS entity

I had to in my Flow because I was waiting for the Approval inside one loop while canceling it in a different one.  So if I didn't split the Approval I didn't have access tothe Approval ID to cancel it.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper V
Helper V

Re: Cancelling an approval in the CDS entity

Ok, I think I have got this working, however, the job is still running after the record has been deleted.

 

How do I terminate the run after the record has been deleted, but I can't do so as I cannot add it inside a for each loop:

 

CDS.JPG

Highlighted
Dual Super User III
Dual Super User III

Re: Cancelling an approval in the CDS entity

There is no way to terminate the Wait for Approval.  It will eventually timeout and stop, or you can terminate the whole Flow.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper V
Helper V

Re: Cancelling an approval in the CDS entity

Cool. Ok. Do you know the timeout for approvals ?
Highlighted
Dual Super User III
Dual Super User III

Re: Cancelling an approval in the CDS entity

YOu can set the timeout for the Approval action in the Settings for the action.  By default I think it just waits for the whole Flow instance to Timeout at 30 days.  But you can shorten that up to whatever duration you want.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Helper V
Helper V

Re: Cancelling an approval in the CDS entity

Ahh yes. Amazing. Thanks so much for your help.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,640)