J M Smith 16.Jul.12 11:14 AM a Web browser Applications Development7.0.2 FP3Windows XP
Good Morning. We had to create an ssl certificate last week for our application server. The application server only had the domino console on it, so we installed the administrator client to be able to add the ssl keyring information. All of that is good to go now, but since administrator has been installed... we are having agents that have been working for years to stop working. Most of the problems we have found so far have been issues of loosing handle to a document when a sub routine is called on a webquerysave. The webquerysave generates an email and then calls a sub to generate another email as below. The first email gets sent fine and the second email gets sent also except everywhere I reference the fields from "doc" are returned blank. It's just strange that it has always work until now. The agent security is set to "Allow restricted operations with full admin rights" and ran on behalf of a user that has manager access to the db. Sorry to write so much.
Jason
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim maildoc1 As NotesDocument
Dim rtitem As NotesRichTextItem
Dim item As NotesItem
Dim richstyle As NotesRichTextStyle
Set db = session.currentdatabase
Set doc = session.documentcontext
Set maildoc1 = New NotesDocument(db)
Set rtitem = New NotesRichTextItem(maildoc1, "Body")
Set richstyle = session.createrichtextstyle
With maildoc1
.form = "Memo"
.sendto = "test1@test.com"
.copyto = ""
.blindcopyto = ""
.subject = "Email 1"
End With
richstyle.notescolor = COLOR_BLACK
richstyle.fontsize = 10
richstyle.bold = True
richstyle.underline = False
Call rtitem.appendstyle(richstyle)
Call rtitem.appendtext("Organization")
Call rtitem.addnewline(1)
Call rtitem.appendstyle(richstyle)
Call rtitem.appendtext(doc.Organization(0))
Call maildoc1.send(False)
Call Notification_Email_2
End Sub
Sub Notification_Email_2
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim maildoc2 As NotesDocument
Dim rtitem As NotesRichTextItem
Dim item As NotesItem
Dim richstyle As NotesRichTextStyle
Set db = session.currentdatabase
Set doc = session.documentcontext
Set maildoc2 = New NotesDocument(db)
Set rtitem = New NotesRichTextItem(maildoc2, "Body")
Set richstyle = session.createrichtextstyle
With maildoc2
.form = "Memo"
.sendto = "test2@test.com"
.copyto = ""
.blindcopyto = ""
.subject = "Email 2"
End With
richstyle.notescolor = COLOR_BLACK
richstyle.fontsize = 10
richstyle.bold = True
richstyle.underline = False
Call rtitem.appendstyle(richstyle)
Call rtitem.appendtext("Organization")
Call rtitem.addnewline(1)
Call rtitem.appendstyle(richstyle)
Call rtitem.appendtext(doc.Organization(0))
Call maildoc2.send(False)