SPListItem.UpdateOverwriteVersion create a minor version?
-
19. února 2012 8:01
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
Všechny reakce
-
22. února 2012 0:15
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.
-
22. února 2012 3:55
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