Sorry for reposting but I haven’t found a resolution since my last post some time ago and I’m at a loss as to what the issue is since this just suddenly stopped working a few weeks back. The agent runs perfectly when I trigger it manually and there’s no error message thrown when scheduled. I’ve checked the following:
-
No readers field values in the document being updated
-
Signer & server have Manager access in the ACL with full Admin. rights and no agent restrictions
-
document locking is not enabled
The only thing that’s changed on our servers since the issue started was mail servers, mail template & NAB being upgraded to 6.5.2 whereas the application server that runs this agent has been left 6.0.2 CF1. Would this have anything to do with it? Also the Notes Log shows a Notes Error following the processing of this Agent: “…you do not have a mail file/server specified…” (but the messages do get sent) I have posted my code below (excluding the global declarations):
Sub firstNotice(db As NotesDatabase, doc As NotesDocument)
On Error Goto ErrorHandler
Set notify = New NotesDocument(db)
'Check for TA assignment
If doc.TA(0) = "" Then
Set gbdb = New NotesDatabase(doc.gbserv(0), doc.gbdbase(0))
Set bkrview = gbdb.GetView("(BrokerName)")
Set bkrdoc = bkrview.GetDocumentbykey(doc.BDABroker(0))
If Not(bkrdoc Is Nothing) Then
Assist = bkrdoc.bkrTA(0)
End If
Else
Assist = doc.TA(0)
End If
If Assist <> "" Then
Call parseTA(doc, Assist)
Set TAnme = New NotesName(Assist)
End If
'Get the correct TA or Broker name as the sender
bkr = doc.BdaBroker(0) 'Get and parse the BDA Broker to send or cc to.
Call parseBroker(doc, bkr)
Set bkrnme = New NotesName(bkr)
'Setup and send notification
notify.Form = "Memo"
notify.Department = "Casualty"
notify.Reader = ""
If Assist = "" Then
recipient = bkrnme.Canonical & "@MMC" '@MMC needed to send to adjacent domain
Else
recipient = TAnme.Canonical & "@MMC" '@MMC needed to send to adjacent domain
End If
notify.SendTo = recipient
notify.EnterSendTo = recipient
If Assist <> "" Then
notify.CopyTo = bkrnme.Canonical & "@MMC"
notify.EnterCopyTo = bkrnme.Canonical & "@MMC"
End If
rfnamepos% = Instr(1, recipient, " ")
rfname$ = Trim(Left$(recipient, rfnamepos%))
If Assist = "" Then
notify.From = bkrnme.Abbreviated + "@MMC"
notify.Principal = bkrnme.Abbreviated + "@MMC"
notify.SMTPOriginator = bkrnme.Canonical + "@MMC"
Else
notify.From = TAnme.Abbreviated + "@MMC"
notify.Principal = TAnme.Abbreviated + "@MMC"
notify.SMTPOriginator = TAnme.Canonical + "@MMC"
End If
notify.Subject = msgType & ": " & doc.ClientName(0) & "/Effective: " & Format$(doc.EffectiveDate(0), "Medium Date") & " - Policy Follow-up"
Set rtitem = New NotesRichTextItem(notify, "Body")
Txt$ = "Please follow-up with the following markets for policies that are currently " & Cstr(NumDays) & _
" days overdue from the date of binding or when all subjectivities were received:"
Call rtitem.AppendText(Txt$)
Call rtitem.AddNewLine(2)
Call rtitem.AppendText(Notice)
Call rtitem.AddNewLine(2)
Call rtitem.AppendText("Note: If these policies have been received, please indicate this in the corresponding worksheet => ")
Call rtitem.AppendDocLink(doc, doc.ClientName(0))
Call notify.MakeResponse(doc)
Call notify.Save(True, False)
Call notify.Send(False)
doc.PRFollowup = NumDays 'This returns a number for the next overdue flag
doc.PRFollowupID = notify.UniversalID
Call doc.Save(True, True) '<= this is where it's not processing!!!
Exit Sub
ErrorHandler:
Print "Error # " & Err & " occurred for client: " & doc.ClientName(0) & ": " & Error & " - on Line " & Erl
Resume Next
End Sub