SPListItem.UpdateOverwriteVersion create a minor version?
-
Sunday, February 19, 2012 8:01 AM
Hi All,
In a document library in which minor version is enabled, UpdateOverwriteVersion() creates a minor version.
The thread - http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/e0d1af63-3705-4b58-95c5-f0f92f86a23f - explains the similar problem and proposes the solution as turn-off the minor versioning, update the item and turn-on the minor versioning.
But, I cannot temporarily turn-off the minor versioning setting, since the same library may be in use by other users to upload/change their documents and the turning-off the setting might affect their operations.
Is there any-other solution?
Thanks and Regards,
Arjabh
All Replies
-
Wednesday, February 22, 2012 12:15 AM
Hi Arjabh,
Interestingly enough I also responded to the forum post you reference and did not agree with the selected responses answer. Please use spListItem.SystemUpdate(false) this will not change the modified date, modified by, or version.
Reference http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.systemupdate.aspx
-Ivan
Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
-
Wednesday, February 22, 2012 3:55 AM
Hi, Ivan
Thanks for the reply.
But the fields which I have to update includes 'Modified By' and 'Modified' as well. So, I cannot use SystemUpdate().
Thanks and Regards,
Arjabh

