We are using a Nintex workflow on a SharePoint Library with a Word document attached to Items.
In the Workflow we want to Copy the current version to an Archive Library before entering a review cycle. What is the easiest and practical way to make that Copy SharePoint Item action happening?
I have read all other posts but they are some older and not having the actions in place like we have now in the latest Nintex versions O365.
Your thoughts and maybe a solution is welcome.
Update: I have found 2 articles, 1 from Vadim who explains it for a List Item with attachments:
and the below one which explains a method for a Library (using the CopyTo webservice)
I will workout the first one based on the initial workflow done by Vadim and replace the endpoint url to something like this as explained by ben because I need this for a Library and not a List Item Copy.
[%Workflow Context:Current Site URL%]_api/web/folders/GetByUrl('Original Document Location')/Files/getbyurl('[%Variable:currentItemName%]')/CopyTo(strNewUrl='/sites/Meetingsite/DocumentNewLocation/[%Variable:currentItemName%]',bOverWrite=true)
If I am not in the right direction, can you let me know 🙂
Just got to the one-liner code to copy the attachment across.
See attached 2 actions I have used. https://domain.sharepoint.com/sites/yoursite/subsite/_api/web/getfilebyserverrelativeurl('/sites/you...)