 |
 |
Submitted by Myle Luong on 05/20/2004.
 | |
 |
I run couple tests against this feature and found out that the tool is very impressive.
Somehow since this action is performed from UI so there is a limitation for the entries you are going to create.
If you have about 10 Reminder calendar entries, it's working fine, but if you have about 20 entries the program will be aborted.
COuld you please tell me what did I do wrong? I'm on R6 version and wonder there is any discrepancies from the database's original version
Please see the sample revised scripts
REM This code will add your etimesheets due date reminder to the user's calendar by using front end classes and allowing the form's built in funtionality to handle the validation
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As New NotesDatabase ("","")
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim userName As New notesname(session.username)
Dim dbfilename As String
Dim dbserver As String
Dim value As Integer
Call db.OpenMail
dbfilename=db.filepath
dbserver = db.server
value = Messagebox ("Do you want the FY05 Bi-weekly e-timesheets due dates reminder to be " + Chr(10) + "added to your calendar?", (4+32+0+0), "Add TS due date ReminderTo Calendar")
If (value = 6) Then
'***************** Create duedate from UI front **************************
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","05/24/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","06/07/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","06/21/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","07/02/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","07/19/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","08/02/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","08/16/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","08/30/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","09/13/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","09/27/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","10/11/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","10/25/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","11/08/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","11/19/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","12/06/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","12/17/2004")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","01/03/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","01/14/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","01/31/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","02/14/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","02/28/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","03/14/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","03/28/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","04/11/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject","Bi-weekly Timesheet Due Date")
Call uidoc.FieldSetText("StartDate","04/25/2005")
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
'****************************************************************************************************
Messagebox ("Calendar updated with FY05 Bi-weekly e-timesheets due dates reminder.")
Else
Messagebox ("Calendar not changed.")
End If
End Sub
>>>>>>>>>> Thank you and have a great Summer 2004 |
Go back |
|  |
|