Empty NoteID in postsave?

Hello,

In postsave I only have one agent call with passing doc`s NoteID.

Set agent = db.GetAgent(“AgentName”)

agent.Run(doc.NoteID)

Problem is that it works ok with one form, but with the other it wont - NoteID is always empty.

When I open same doc and save it again - NoteID is there.

Why it wasnt created during first save?

Does it depend on some fields, formulas, other events… ?

Thnx in advance,

Dragan

Subject: Empty NoteID in postsave?

NoteID can only be created as the document is first saved. So after your save, the document stored in the database has it’s NoteID.

But the document you have in memory is a copy of the document before it was saved. You’ll need to discard that, and get a new NotesDocument copy of the disk version.