If you ran the following code in the Web Query Save agent that was assigned to a form with a subject field. The original value of subject was “Truck” and the new value entered on the web was “Car”. The Web Query Save agent code was:
Dim Session As New NotesSession Dim docBefore As NotesDocument Dim documentContext As NotesDocument Dim docAfter As NotesDocument Set docBefore = Session.CurrentDatabase.getDocumentByUNID("f02506889e2d5cfc8625712f001b02f9") Msgbox "Before: " + docBefore.subject(0) Set documentContext = Session.DocumentContext Msgbox "Context: " + documentContext.subject(0) Set docAfter = Session.CurrentDatabase.getDocumentByUNID("f02506889e2d5cfc8625712f001b02f9") Msgbox "After:" + docAfter.subject(0) |
I was expecting to see:
Before: Truck
Context: Car
After: Truck
What I saw was:
Before: Truck
Context: Car
After: Truck
Domino seems to read the document from the database until the DocumentContext is used at which the document is read from memory where the changes are allready made. This will make my job capturing what has change for Open Audit a litte hard, thus take a little more time.


