TransWikia.com

Approval Flow to Delete a File from Document Library from SharePoint

SharePoint Asked by Fatimah Mohmmed on December 28, 2020

I have created an approval flow that confirms the deletion of any file from a document library. When a file is deleted it will send an approval email to the approval user to approve/ reject the deletion.

When he rejects it should put back the file into the document library. when the flow comes to restore the file from the Recycle Bin it does not execute this step. !

here is my workflow:

enter image description here

2 Answers

Agree with Akshay's opinion, you will need the recycle bin item id to call the http request.

First you need to call the rest Api to get the ID and use that id to restore. I tested and succeed. enter image description here

Correct answer by Jerry_MSFT on December 28, 2020

Instead of deleting file and than restoring it back, it would make more sense to remove this file from library after Approval. If you don't want to display the file just create a column e.g. PendingForDeletionApproval and filter the View based on that. Once it is approved you can remove from Library as well as recycle bin if needed.

Now to answer your issue why the file is not restored. Its not clear from your screenshot but I assume the ID parameter you are using for Restore is the from Document library, while the API needs item ID from Recycle bin which is not same as that of document library.

Answered by Akshay Randive on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP