Pergunta

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

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top