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

How to stop MS Flow with approval while the approval is active?

Hi,

 

i am executing a flow "when a item is created" in a sharepoint list, that flow sends an approval and wait for the response. The problem appears when i delete the item, in this moment i am waiting for the time out approval for terminate the flow, but the time out approval is 24 hours ... so it's to much time to wait, because the approver is going to see the approval waiting to be answering, but the item was deleted.

 

i wait your answer.

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to stop MS Flow with approval while the approval is active?

Normally, the way to fix this would be to have another Flow that fires when the document is deleted and then use that to find the related Approval in CDS and delete the Approval.  But there is an issue with the File Deleted trigger right now that it won't provide you with any information about the file that was deleted for security reasons.  So there is no way to lookup the Approval and remove it.  At this point your only choice is to wait for the approval to timeout.



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

Re: How to stop MS Flow with approval while the approval is active?

@Hi @yanina ,

 

Please see below posts. It says if you have access to Common Data Service database you should be able to acheive this. So you might setup another flow trigger when a list item is deleted then look the CDS and try to set the status.

 

https://powerusers.microsoft.com/t5/General-Flow-Discussion/How-to-cancel-the-approval-request/td-p/...

 

https://veenstra.me.uk/2019/06/13/cancel-your-pending-approvals-in-microsoft-flow/

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 

Highlighted
Super User
Super User

Re: How to stop MS Flow with approval while the approval is active?

Normally, the way to fix this would be to have another Flow that fires when the document is deleted and then use that to find the related Approval in CDS and delete the Approval.  But there is an issue with the File Deleted trigger right now that it won't provide you with any information about the file that was deleted for security reasons.  So there is no way to lookup the Approval and remove it.  At this point your only choice is to wait for the approval to timeout.



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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 49 members 4,680 guests
Please welcome our newest community members: