logo

New Response

« Return to the blog entry

You are replying to:

  1. I found something interesting and unexpected when trying to get Stephans code to work as expected.

    When the oldDoc above is created from the newDocs unid lookup, you would expect newDoc to be the modified document inbound from the browser and the oldDoc to be the document on disk. Not so. Testing with Version 6.5.0 with the above code running in a WQS agent, the following outputs produce identical values!

    <code>

    Set newDoc = s.documentcontext

    Messagebox(newdoc.plaintext(0))

    Set oldDoc = db2.GetDocumentByUNID(newDoc.universalid) ' despite what we would expect, oldDoc and newDoc are identical at this juncture.

    ' this leaves us seemingly no way to retrieve the original changes.

    Messagebox(olddoc.plaintext(0))

    </code>

    At this point, the only way I can see to preserve the prior version in its unedited state is to create a 'safe copy' on WQO, but I question whether that is even possible, and then if no changes are saved, you have a potentially unwanted document to deal with.

    As it stands, I'll take the little quirk if I get some degree of versioning over the web.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: