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
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
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.

 

 

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

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 ?
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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (70,229)