Marina Charoensuk 14.Oct.03 03:35 AM a Web browser Lotus Workflow Engine3.0Windows 2000; Windows 95/98; Windows NT
I use DWF version 3.0a and I would like to send notify overdue to PARTICIPANTOS when they don't do anything in their activity within due time. So I have customized in "QueryActivityOverdueMail" & "QueryInboxOverdueMail" & "QueryProcessOverdueMail" so my code is like this:-
***************************************
Private Function QueryActivityOverDueMail_(Continue As Integer, CoverDocument As NotesDocument)
Continue=False
On Error Goto Err_QueryActivityOverDueMail
Print " QueryActivityOverDueMail"
Dim db As NotesDatabase
Dim maindoc As NotesDocument
Dim mail As NotesDocument
Dim body As NotesRichtextItem
Set db=CoverDocument.ParentDatabase
Set mail=New NotesDocument(db)
Set body= New NotesRichtextItem(mail,"body")
Set maindoc=DWFBinderGetMainDocument ( CoverDocument )
If (maindoc Is Nothing) Then
Print CoverDocument.BinderDocIDOS(0)
Print "The main document cannot be found"
Else
Print CoverDocument.BinderDocIDOS(0)
Print "The main document has been found"
End If
mail.Form = "Memo"
mail.Subject = " QueryActivityOverDueMail_These jobs are overdue. Please make sure they are completed soon."
mail.SendTo = maindoc.PARTICIPANTOS(0)
Call body.AppendText("Dear Participant")
Call body.AddNewLine(2)
Call body.AppendText("These jobs are overdue. Please make sure they are completed soon. >>> ")
Call body.AppendDocLink(maindoc , db.Title)
Call body.AddNewLine(2)
Call body.AppendText("Thank you.")
Call body.AddNewLine(1)
Call body.AppendText("")
Call mail.Send(False)
End Function
***************************************
When the agent was run. I've seen the error message on server log that show "Object Variable not set" in the line that I code "Set maindoc=DWFBinderGetMainDocument ( CoverDocument)" and another error that show are "The main document can not be found" (because I code program to track error).
Who can tell me Did I do something wrong about this code? Why I can't get maindocument from the coverdoc. Plase advice me. Thank you very much.