cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

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

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

Anonymous
Not applicable

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.

 

 

Pstork1
Dual Super User III
Dual Super User III

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.
Anonymous
Not applicable

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

Pstork1
Dual Super User III
Dual Super User III

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.
Anonymous
Not applicable

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

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.
Anonymous
Not applicable

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,113)