Is there a way to restore the previous document version and delete the current on SharePoint 2013 using the Send an HTTP Request to SharePoint node?
Any help would be appreciated!
Solved! Go to Solution.
I can't seem to be able to retrieve the Versions of the document.
When I insert the URL in the browser I am able to successfully obtain something.
โ
works in the browser: https://XXXXX.sharepoint.com/xxxxxx/xxxxxx/_api/Web/GetFileByServerRelativePath(decodedurl='/xxxxxxx...
However, this is not working when running with Send an HTTP Request to SharePoint:
SharePoint is able to retrieve https://XXXXX.sharepoint.com/xxxxxxxx/xxxxxx/_api/Web/GetFileByServerRelativePath(decodedurl='/xxxxx...')
so the document is indeed correct and it does exist. I am sure of that.
This is what worked for me:
Hi @Anonymous,
I have managed to do this via flow. There are quite a lot of steps to follow here.
Once I updated all information I will let you know soon.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @Anonymous ,
Please see my blog post
https://mydevexperience.wordpress.com/2019/06/08/build_msflow_restoredocversion/
Any questions please let me know.
If you found this useful mark it as accepted solution.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @Anonymous ,
Did you tried the flow steps which I suggested?
If you need further help please let me know.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsThank you for your answer @abm.
What did you put in the GetFolderByServerRelativePath? Was it the Folder Path? Or maybe the file name with extension?
I tried with both but it didn't work.
I can't seem to be able to retrieve the Versions of the document.
When I insert the URL in the browser I am able to successfully obtain something.
โ
works in the browser: https://XXXXX.sharepoint.com/xxxxxx/xxxxxx/_api/Web/GetFileByServerRelativePath(decodedurl='/xxxxxxx...
However, this is not working when running with Send an HTTP Request to SharePoint:
SharePoint is able to retrieve https://XXXXX.sharepoint.com/xxxxxxxx/xxxxxx/_api/Web/GetFileByServerRelativePath(decodedurl='/xxxxx...')
so the document is indeed correct and it does exist. I am sure of that.
This is what worked for me:
Hi @Anonymous ,
In your step Send an 'HTTP request to SharePoint7' Uri value don't need the https://xxxx.sharepoint.com/ instead you need _api/Web/..........etc
Please see my blog post for more details
https://mydevexperience.wordpress.com/2019/06/08/build_msflow_restoredocversion/
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsThanks, I must have written that twice by mistake.
Anyways, to sum up, this did not work for me:
โ
_api/Web/GetFileByServerRelativePath(decodedurl='library/document')/Versions/restoreByLabel('VersionLabel')
This did:
โ
_api/web/GetFolderByServerRelativeUrl('library')/Files('document')/Versions/restoreByLabel('VersionLabel')
You could add this as an alternative option to your blog post.
Hi @Anonymous ,
Thanks for your update.
The difference is we have two different configurations.
I have edu is my document library and Portal Ideas is the folder name.
Looks like you have no specific folder names.
Glad to hear that it is wokring as expected.
Thanks
Ajith
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsIm currently working on this as well, when i run the http request the restorebylabel returns null value
Hi @karl_oliverio ,
Could you please follow this link below & check whether you could restore it manually or not.
Let me know whether you can do the restore manually.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @abm - I got it now. When the document version is restored, it will create a new version on top of the current version. I was thinking the old version will just become the current published version. I already checked it and it is working as expected. Thank you!
Join digitally, March 2โ4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
80 | |
55 | |
55 | |
43 | |
39 |
User | Count |
---|---|
83 | |
81 | |
76 | |
65 | |
42 |