Is there a method/event/whatever that can give me the document that is going to be deleted, before it is toumbstoned? I have a need to set some flags when certain documents are removed on my local device and all of the properties are gone when the document is deleted.
In 2.5 you can install a replication filter. It will be called before the replicator changes a document. If the change is a deletion, you can fetch the existing document and save anything you need to.
Changes not made by the replicator are under your control, so you can modify your own code to do this before deleting a document.