How to detect if a uiDocument needs saving

Using LotusScript, is there a way to detect if an open document is “dirty”? (has been modified and needs saving)

The Notes Client knows if it needs to be saved or not. I checked $modifiedBy field but it’s not changed until the save. I know I could check manually for changes to each field but would be a pain on this complex document.

  • Thanks

Subject: None that I know of. Been wishlisted for a couple of years: NotesUIDocument.IsDirty

Subject: thanks Bill

yea, that’s too bad.

Subject: woops…

…guess I cannot delete this extra post

Subject: Speak and ye shall be heard…dirty doc

NotesUIDocument.ModifiedSinceSaved

Example:

If uidoc.ModifiedSinceSaved Then 'undocumented UIDOC LS property**

				If Me.buildAuditTrail(uidoc)  Then

					Call Me.CreateAuditTrailDoc(uidoc.Document, uidoc)

				End If

			End If

Subject: RE: Speak and ye shall be heard…dirty doc

Huge THANKS to Jimmy Ray! Where do you find these undocumented features? (and why don’t they tell us?)

Subject: Take care !

This feature is undocumented, because it isn’t predictable in all circomstances.

Most of this undocumented functionality is found by ‘dissecting’ the Lotus templates (Mail template!)

Subject: Take care … its time for this function

The usual caveats with undocumented “features” certainly applies, but it has always worked the way I needed it to. But…maybe it is time to document it and make a reliable addition to the NotesUIDocument class! It certainly has been requested!

If it is used in the released version of mail6.ntf then it should be documented somewhere. Lotus provides C and C++ API documentation without support (unless you pay for it $$$).