Reputation: 3127
I have a Xpages app that containts Tips. I send out weekly emails with links to the documents in the database. I want to be able to compute in the document the proper URL for opening these in the web, but I cannot seem to be able to do that (I need to do this as the users might be on cellphones, at home, in iNotes, etc.
var urlStr:String = "https://xxxx.xxx.com/";
var dbStr:String = "database.nsf/"
var UNID:String = document1.getDocument().getUniversalID();
urlStr = urlStr + dbStr + "0/" + UNID + "?OpenDocument"
This opens the document on the web, even though I have the form set to open in an page.
This is the URL that I want to compute, but I cannot see how I can compute the name of the Xpage in the Xpage.
There has to be a way.
Trying to access the form element
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim s As New NotesSession
Set db = s.CurrentDatabase
Set form = db.GetForm("lotusTip")
Dim xpageStr
Forall field In form.Fields
Messagebox(field)
End Forall
End Sub
Upvotes: 2
Views: 1187
Reputation: 30960
Define the XPage you want to open a form with in forms properties:
This way your URL http://server/database/0/...UNID...?OpenDocument
will work.
Upvotes: 3
Reputation: 15729
If you're trying to identify which XPage a Form opens with, that's defined in the $XPageAlt field for web and $XPageAltClient field if you have a specific alternative XPage to open for XPiNC. You can create a NoteCollection to retrieve the Form, then access that element.
It's something we've extended in OpenNTF Domino API, with a Document.getForm() method to easily retrieve the form and a Form.getXPageAlt to retrieve the XPage name.
Upvotes: 0
Reputation: 3524
To open XPage in Notes client use notes url syntax:
notes://server/path/database.nsf/pagename.xsp?openXpage
Upvotes: 0