Is it possible that something happens after PostSave? I have a very strange problem with field values disappearing in some circumstances. I have looked at the Form’s PostSave event, and right through to the very end, the fields have the expected value. But when the document is closed, these fields are empty.
This is an example of what’s in the form’s Postsave
Before it runs’ the LotusScript PostScript, I can see that the field EventID is empty …
Dim a As String, b as String
a = source.FieldGetText(“EventID”)
Messagebox a,64,“Before” gives me a blank
then it runs the PostScript …
Call csEventObj.PostSave()
and the fields are correctly populated
b = source.FieldGetText(“EventID”)
Messagebox b,64,“After” gives me the correct value.
Immediately after this, the document is closed (Call csEventObj.PostSave() is indeed the last thing in the form’s PostSave) , but the field EventID does not exist in this document!!!
Can anyone help me - I’m going nuts.
Subject: what can possibly come after PostSave?
QueryClose event (which is triggered when the document is closed).
Renaud
Subject: RE: what can possibly come after PostSave?
Thanks for the reply (Notes Help does not say this), but anyway, the values are still there after QueryClose runs. Have you any other clues?
Subject: what can possibly come after PostSave?
It sounds like you are reading the UI document (source) rather than the database document you actually saved. The UI document (and it’s Source.Document) are the in-memory copies that the user is working with.
So it sounds like you have a field in the UI that’s not being saved to the database.
Is it a Computed for Display field ? Those are never saved.
Do you have a SaveOptions field that’s set to zero ? If so, save does not change the database document.
Regardless, if you want to see what’s been saved, you’ll need to open a 2nd NotesDocument to get a copy of what’s actually saved in the database.
Subject: RE: what can possibly come after PostSave?
Thanks for the response.
In fact, the fields are Computed, and this problem only occurs in one specific condition - if the Calendar Event is a repeating Meeting. In all other conditions, the document saves with these fields populated.
Any ideas?