cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdrussell78
Level: Powered On

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
Dual Super User
Dual Super User

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
Dual Super User
Dual Super User

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

jdrussell78
Level: Powered On

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
Dual Super User

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.
jdrussell78
Level: Powered On

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

Dual Super User
Dual Super User

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.
jdrussell78
Level: Powered On

Re: Cancelling an approval in the CDS entity

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

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.
jdrussell78
Level: Powered On

Re: Cancelling an approval in the CDS entity

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 254 members 5,143 guests
Please welcome our newest community members: