Been working through an interesting issue with regards to files and programmatically moving of said files.
Here is the scenario:
1) I have a form that is capturing some metadata associated with a content type.
2) I use the captured metadata to create a document from a template stored in SharePoint (the document uses the metadata to drive some server-side processing of the contents of the template to dynamically create a new document).
3) The new document is dropped off in the Drop Off Library as an intermediate staging location.
4) I make a call to determine the final location of the file based on the metadata and Content Organizer and routing rules.
5) I use SPFile.MoveTo(url) to move the file to the final location.
Now, here's the problem: once the file is moved to the final location, some of the metadata is reset to the metadata in the template document (in particular taxonomy fields). Both locations have the same content types and when the document
is dropped off for the first time at step 3, it has the correct metadata on the list item (the taxonomy fields are preserved).
The move is from the Drop Off Library to a folder in another library within the same SPWeb (same site).
View Complete Post