Has anyone figured out on how to move a file to a sub site with just the out of the box actions?
I am busy looking at the Call action to use Rest, but no lock s
Technology Tips and News
Has anyone figured out on how to move a file to a sub site with just the out of the box actions?
I am busy looking at the Call action to use Rest, but no lock s
I assume, moving it automatically...
Since you mentioned it, here's a good example of moving a file via a workflow leveraging the REST API
Hi Margiet,
That is correct. It needs to happen in a SharePoint 2013 Workflow.
Did you forget to post the link?
Hi Michele,
You can do it via custom actions:
Please have a look at below links:
http://experiencesharepoint.blogspot.com/2013/04/custom-workflow-action-to-move-
file.html
https://plumsail.com/blog/2014/06/how-to-move-documents-using-workflow-in-sharepoint-2013-and-office-365/
Thank you Margariet,
So if I have Site A "Docs" with document library A => http://sp.contoso.com/docs/A/somefile.pdf, what will the URL for the Rest Call have to be to move it to Site B that is a subsite of Site A "Hold" with document library B => http://sp.contoso.com/docs/Hold/B/somefile.pdf
This is what I have been struggling with and if I see "Bad Request" in the workflow Rest API response I am going to cry or scream, still deciding about which one.
I have been ab;e to create sites, lists and libraries with the Rest Calls in 2013 workflows, but this has me stumped.
@Sachchin,
Thank for the advise, but the solution has to be 99% OOTB.
If it wasn't for that I would have solved this a week ago.
Hi Michle,
If you want to move document http://sp.contoso.com/docs/A/somefile.pdf to http://sp.contoso.com/docs/Hold/B/somefile.pdf, then you can use the REST URL like this: http://sp.contoso.com/_api/web/lists/GetById(guid'{ListId of library A}')/Items({ItemID of somefile.pdf})/File/MoveTo(newUrl=' http://sp.contoso.com/docs/Hold/B ',flags='1').
You can follow the steps in the link provided by Margariet to configure the 2013 workflow for moving documents.
You can also do as Dyung said, use Content and Structure to move the documents to the place where you need within the site collection.
http://mroffice365.com/2013/05/sharepoint-2013-manage-content-and-structure/
Thanks,
Victoria
Hi Victoria,
I tried with a "HTTP POST" call to:
http://unidev/_api/web/lists/GetById(guid'856bd3ba-7a70-4eaa-9ea7-6610d038e390')/Items(10)/File/MoveTo(newUrl='http://unidev/sheq/Uploaded',flags='1')
But my ResponseCode is just "BadRequest"
This is where I have been stuck from day 1
Hi Michle,
Please change the URL as below shows:
Remove the guid and modify the newUrl parameter to the relative url of the file.
Thanks,
Victoria
Hi Victoria,
This issue is starting to make me feel like this is not possible.
Here are some screenshots.
Hi Michle,
As my test, the MoveTo function can only move documents at the same site level.
As a workaround, I tested with 2010 workflow platform and use Send Document to Repository action to move the document to the subsite's drop off library and then the documents will be moved to corresponding library based on the pre-defined content organizer rules.
Thanks,
Vcitoria
Hi Michle,
As my test, the MoveTo function can only move documents at the same site level.
As a workaround, I tested with 2010 workflow platform and use Send Document to Repository action to move the document to the subsite's drop off library and then the documents will be moved to corresponding library based on the pre-defined content organizer rules.
Thanks,
Victoria