tcm team commented on Jul 30, 2013

Re: Using existing LotusScript in an Xpage

Delete isn't good enough, you have to use doc.recycle() to get rid of it.

John Haslam commented on Mar 20, 2009

Using existing LotusScript in an Xpage

I was trying to exchange data between an XPage and a LotusScript agent in a similar way, but using a standard document rather than a profile document. It proved tricky to get the updated parameter document: simply using database.getDocumentByID() or database.getDocumentByUNID() returned the un-modified parameter document, even if I used the delete statement to try to tell JavaScript to "let go" of the old reference and pick up the updated one. I didn't want to delete the parameter document so as to avoid building up deletion stubs, so my current solution is to get the modified document from a view sorted by the parameter document's NoteID.