Hi @all,
ich habe in dem Teamroom Template zwei undokumentierte zwei Properties der Scriptklasse "Session" gestossen. Leider ergeben die nicht das gewünschte Ergebnis.
Weiss jemand, woher diese Properties die Werte übernehmen ?
---
Sub Initialize
Dim dbug As New noteslog("wSendLink")
'logging is for debug purposes
Set dbug = New NotesLog("wSendLink")
'to turn off the debug log, set this to False
dbug.LogActions = True
dbug.OpenAgentLog
Dim session As New notessession
Dim note As notesdocument
Dim TRname As Variant
Dim TeamRoomName As String
Dim Subj As Variant
Dim peopleList As Variant
Dim errMsg As String
Dim lcDocType As Variant
Dim lcMtg As Variant
Dim peopleView As notesview
Dim partdoc As notesdocument
Dim partAddress As Variant
Dim DDrtitem As notesrichtextitem
Dim mailnote As notesdocument
Dim Sname As String
Dim goBack As String
Dim noteUNID As String
Dim errList As String
Dim L As Integer
Dim trimComma As String
Dim profiledoc As notesdocument
Dim dbpath As String
Dim wMail As String
InstantiateObjects
Set note = session.documentcontext
dbpath = getdbpath
wMail = " http://"+session.internethostname+"."+session.internetdomainname+"/"+ dbpath+"/($All)/"+note.universalid Set profiledoc = db.getprofiledocument("tempvars")
If note.isnewnote Then
profiledoc.MailSent = getstring(14)
Exit Sub
End If
TRname = note.getitemvalue("TeamRoomName")
If trName(0) = "" Then
TeamRoomName = getString(2)
Else
TeamRoomName = trName(0)
End If
subj = note.getitemvalue("Subject")
peopleList = note.getitemvalue("People")
lcDocType = note.getitemvalue("DocType")
lcMtg = note.getitemvalue("DefaultDocType3")
If subj(0) = "" Then
subj(0) = getString(1)
End If
If peopleList(0) = "" And Lcase(lcDocType(0)) = Lcase(lcMtg(0)) Then
profiledoc.MailSent = getstring(5)
Exit Sub
Elseif peopleList(0) = "" Then
profiledoc.MailSent = getstring(6)
Exit Sub
End If
Set mailnote = New notesdocument(db)
Forall x In peopleList
Set DDrtitem = New NotesRichTextItem(mailnote, "Body")
Set peopleView = db.getview("PeopleLookup")
Set partdoc = peopleview.getdocumentbykey(x)
partAddress = partdoc.getitemvalue("email")
If partAddress(0) <> "" Then
x = partAddress(0)
End If
Sname = x
mailnote.SendTo = x
mailnote.subject = subj(0)
Call DDrtitem.appendtext(getString(
)
Call DDrtitem.addnewline(2)
Call DDrtitem.appendtext(getString(9) + TeamRoomName )
Call DDrtitem.addnewline(2)
Call DDrtitem.appendtext(getString(10) )
' Call DDrtitem.appenddoclink(note,"")
Call DDrtitem.appendtext(wMail)
On Error Goto ErrorMessage
Call mailnote.send(False)
End Forall
Goto Finish
errorMessage:
errList = errList + ", " + Sname
L = Len(ErrList)
dbug.logaction("errlist = " + errlist)
dbug.logaction("length=" + Cstr(L))
Resume Next
finish:
If errList <> "" Then
trimComma = Right(errList, L-2)
errList = trimComma
profiledoc.MailSent = "Beim Senden von E-Mail an folgende Personen ist ein Fehler aufgetreten: " + errList + ". " + getString(13)
Else
profileDoc.MailSent = getString(11)
End If
End Sub
---
Was wird dort ausgewertet
Denn leider wird nicht die richtige URL zusammengebaut, die InternetDomain ist falsch :-(
Bin für jede Hilfe dankbar.
Gruss JoFa