2

I have a Document Library with versioning enabled. After someone has approved a document, the word document gets converted to a pdf with Muhimbi and gets copied to the intranet (other site collection).

In the Item updated method I cannot access the major version (I can for SPListItem but not for SPFile). The SPFile.Openbinary() only gets me the binary of the last/current minor version.

The problem is that we use the version label in our Template (https://stackoverflow.com/questions/508229/how-can-i-include-value-of-sharepoints-version-column-in-a-word-document#answer-590444). How do I get the binary data of the Major version in ItemUpdated? I need this before converting the document with Muhimbi. Or is the Major Version officially saved after the event receiver is done? Now I seem to convert the minor version to pdf which shows in the version label.

I am using SharePoint 2010.

0

Finally got it solved. I did a SystemUpdate at the beginning of the Event Receover and then reloaded my SPListItem.

0

It is possible that ItemUpdated event is fired several times during approval.

Is yes, you can check the Level property of SPListItem or SPFile and do your code when major version is published.

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.