I'm trying to pass a field value from a application to my own mail database opened in browser.
I got the entire url ( my first reaction: wow, so long )
https://server/MyName.nsf/($Inbox)/$new/?EditDocument&Form=h_PageUI&PresetFields=h_EditAction;h_New,s_NotesForm;Memo,s_ParentContentId;($Inbox)1,s_ViewName;(%24Inbox),s_InheritAttachment;false,s_SortOrder;1,s_SortColumnPN;$70&ui=portal
How can I refer easily to the recipient field ? ( To:
field ) from the mail database ?
I want to use a sessionScope which picks the desired value and then pass it to the above field.
I did for the above requirement in a lotus notes application using lotusScript something like this:
Sub Click(Source As Button)
// soome declarations
Set db=s.CurrentDatabase
Dim dcc As NotesDocumentCollection
Set dcc = db.UnprocessedDocuments
Dim item As NotesItem
Set doc = dcc.GetFirstDocument
' em$=doc.nms_Email(0)
While Not (doc Is Nothing)
If doc.HasItem ("nms_Email") Then
Set item=doc.GetFirstItem("nms_Email")
Else
If doc.HasItem ("txt_Email") Then
Set item=doc.GetFirstItem("txt_Email")
Else
Messagebox "No value for the field!"
Exit Sub
End If
End If
Forall e In item.values
If Len(e) > 2 Then em$=em$+e+"; "
End Forall
Set doc=dcc.GetNextDocument(doc)
Wend
If em$=";" Then Exit Sub
test$=Strleftback(em$, ";")
var=Evaluate({@Explode("} & test$ & {"; ";")})
var2=Evaluate("@MailDbName")
mdb$=var2(1)
msv$ =var2(0)
Set dbm=s.GetDatabase(msv$, mdb$, False)
Set docW = dbm.CreateDocument
docW.form = "Memo"
docW.SendTo=var
Set uidoc = w.EditDocument(True,docW)
End Sub
But how can I do the same thing in xpages?