EditDocument and PostSave

Hi all,

I have a situation that hopefully something can shed some light on.

I have a LotusScript agent that copies some fields of one document in a specific database and creates a new document in another database, which is then populated with the fields from the first document. At the end of the agent, I use EditDocument to display it to the user so they can make any necessary revisions before saving it. The problem is, when the document is displayed via EditDocument, it’s not calling the form’s PostSave code when it is (manually) saved. If I manually open and save the document, it will work fine.

Anyone have any ideas? Thanks.

Patrick

Subject: EditDocument and PostSave

I have trouble crediting that PostSave is not triggered.

What are you doing in the PostSave logic, and how do you know it’s not being triggered ? Have you watched the process using the debugger ?

Are you trying to do anything with the document’s UNID ? If so, remember that a document does not get a UNID until it’s been saved for the first time.

Subject: RE: EditDocument and PostSave

I’m using @MailSend(with all parameters) in the PostSave. I know it’s not triggering because I’m not getting an email. And as noted before, it works fine if I manually open and save the document.

I’m not working with the UNID, but I did try saving the document before displaying it to the user, and that did not solve the problem either.

Patrick

Subject: RE: EditDocument and PostSave

And I found the problem. It wasn’t executing PostSave when I was manually running the agent from within Designer. Once I ran it from within the Notes client, it worked fine. Weird behavior, but since it will only be ran from within the client, it’s workable for me.

Patrick

Subject: RE: EditDocument and PostSave

Ah - so the document opened in the Designer client instead of the Notes client. (Yes, I’ve seen that before…)

The designer client won’t trigger events such as PostSave.