I am copying a file between 2 libraries which contain the same fields. So basically the source library serves as a template library. After the file is copied i update the field values in the destination library. When i open the document and look at the DIP the values are shown correctly.

However, all quickparts in the document look like they have lost their databinding and won't show the new item's field values. When I delete a QuickPart and add a quickpart for the same field it will have the correct value.


 //doc is the sourceitem
 var newFile = destinationList.RootFolder.Files.Add(fileName, doc.File.OpenBinary(), true); 
 // set field values on the item
 DocumentManager.FillListItem(data, newFile.Item); 

Found it! The destination library had it's default content type still set to Document instead of my custom content type. When you copy the bits, it will get the default ctype which does not have those fields so the bindings are invalid! Even setting the content type afterwards doesn't fix things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.