I have a library where version is enabled, both for Major and Minor versions. And i am importing documents to this library that has a lot of metadata i need to set including the internal fields Author, Editor, Created and Modified. It is working fine for updating documents that are minor version, i use the SPListItem.UpdateOverwriteVersion() after settings the Author, Editor, created and Modified fields after i have checked-in the document with a minor version. And this works fine.
My problem is this approach does not work for Major version documents, then Modified by is set to the account i am currently using to import the documents. If I try to run the SPListItem.UpdateOverwriteVersion() command a new minor version is created after the major version.
Is there anyway to update Major version documents in a library to set the Author, Editor, Created and Modified fields without creating a new minor version?
Aucun commentaire:
Enregistrer un commentaire