Hi,
So the scenario is that I have a document library A that contains folders and files. When a status is updated to "sold" a nintex workflow will run and if this condition is met, create a new folder with the same name and metadata in document library B, copy all the contents of the source folder from doc library A into the newly created folder in doc library B, then delete the original folder and files from doc library A.
Both doc libraries exist within the same site collection and site for that matter. There are several variations of this type of workflow already working within my environment.
However, I've had to recreate one today and each time I run it the workflow errors at the Copy to SharePoint action with the following:
Failed to copy item. Object reference not set to an instance of an object.
To explain my workflow some more, I have a conditional action to begin that checks if the folder's status is "sold", from this I set a "FolderName" variable to the name field of the folder. After some logging and checks I then create an item in doc library B (essentially the folder, which works fine), then I use the Copy to SharePoint action to copy the folder contents into the new folder in doc library B. I build the URL as a string, using the URL of the destination library, plus the FolderName variable I captured earlier.
What's weird is I can see that the variable is capturing the folder name and the folder is being created. But I cant understand why the copy action action falls down each time.I've atttached the config behind my copy action for info.
Any advice greatly appeciated!