OnWorkflowItemChanged for document library item - determine if metadata or file has changed?
In SharePoint Workflow - for a document library how do I determine if document metadata or document itself has changed?
Both SPListItem.Versions and SPFile.Versions are added when i only change metadata (like file title). Also SPFile.Length changes if I only change metadat开发者_如何学JAVAa.
I imagine you are making a distinction between the metadata and the content of the file, correct? I imagine that this will be difficult to do since the metadata is part of the file. One possible route would be to investigate how SharePoint generates the notes that it includes in the version history. You might be able to use Reflector to look at the SharePoint assemblies to get some clues. Another option would be to open both files on the server with COM Automation (for example if they were word files) and compare the metadata that way.
精彩评论