Comfirmation of @IsNewDoc behaviour on documents created in back-end

If you create a document in the back-end and then show it to the front-end, like so:

Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Set doc = session.CurrentDatabase.CreateDocument

doc.Form = “TestForm”

Set uidoc = ws.EditDocument(True, doc )

It appears that the formula @IsNewDoc returns false if it is used in any computed fields on the form (in this case TestForm). Is this behaviour expected? After all the document has not actually been saved to disk.

Can anyone shed any light on this for me?

Ta.

Subject: Comfirmation of @IsNewDoc behaviour on documents created in back-end

You are correct, this is a bug if you go by what the helpfile says.On the other hand, using the LS equivalent will help you out.

cheers,

Tom

Subject: Comfirmation of @IsNewDoc behaviour on documents created in back-end

another sad thing about this is it disabled the new R6 field hint features :frowning:

Subject: Comfirmation of @IsNewDoc behaviour on documents created in back-end

The document has never been “saved to disk”, no, but it is not a “New Document” either, in that it is not in the process of being composed. It is an existing document that is being edited in the workspace, which is a beast of a different colour. However, it is still a New Note as far as LotusScript is concerned, so doc.IsNewNote will return true.