hcl-bot
December 27, 2012, 9:16am
1
Hi,
I have a document with form name “X”. This document when opened from a view opens using another form “X1” through Form Formula specified in the view.
Is it possible to use the similar concept in LotusScript?
At one point, my code tries to open the document using uidoc.EditDocument. The moment this executes, the document opens in its actual form i.e. X.
So, what I need is to somehow direct the document to still open using X1 while executing uidoc.EditDocument. Please help.
Subject: change the form name
I had exactly the same problem last month.
Once I had a handle on the document, I just changed the form name before opening it. Also, you need to put a computed hidden “Form” field on the “X1” form with a formula of “X” so that the document doesn’t get saved with the alternative form by accident.
e.g.
call doc.ReplaceItemValue(“Form”, “X1”)
call ws.EditDocument(False, doc, False, “”, false, true)
(By the way, I presume you meant the EditDocument method of NotesUIWorkspace, not NotesUIDocument)
Hope this helps,
Phil
Subject: It helps
Yikes! Yes, I meant uiWorkspace.Your idea helps. Thanks.