It works on reply messages, because forms “Reply” and “Reply with History & Attachments” have OnCreate “Formulas inherit values from selected document” option set, but on Forward documents, @InheritedDocumentUniqieID is empty.
Is there a way to access parent document properties using LotusScript, from Form PostOpen event?
Subject: Not in Postopen, but you can use Queryopen…
…since the document hasn’t opened yet, the “current document” in the UI is whatever document you composed it from. So the Queryopen event can save information in global variables that the Postopen event can read.
If you’re waiting for Querysave/Queryclose to make use of the stored value, the user may meanwhile have closed the original document, so your NotesUIDocument object may no longer be valid. But the NotesUIDocument object you got from it initially, I think might still be valid.
Subject: Current UI document is not always the one the action was applied to…
In general, the suggested approach works, except in the cases below:
Current UI doc can be Nothing.
Select a document in Inbox, click either “New” or “Forward”, then close the new doc without saving/sending it. Without changing the focus in Inbox, click “Forward”. The current UI doc is Nothing.
Current UI doc can point to wrong document.
Select a document in Inbox, click either “New”, “Reply” or “Forward”. Do not close the new doc, go back to Inbox. Without changing the focus, click “Forward”. The current UI doc is the newly opened document.
If the focus changes to another document in Inbox, in both cases current UI document is the correct one.
Rephrasing the original question:
Any way to access original document properties from a forwarded document, before the forwarded doc is saved/sent?