Very Urgent-How can I let user set existing Calendar entries to be sent as SMS using lotusscript only
Posted on 2003-10-25
I require an immediate solution... I am not sure how to implement this functionality. I will explain the scenario. I have to present the user the list of existing calendar entries from which he can choose one or more calendar entries to be sent as SMS. For the entries which he chooses. I have to send an SMS half an hour before that scheduled time in the entry.
Let me tell you what I have tried. I have created a view which inherits the calendar outline... I have added two more columns in which one column- I thought I will set the flag value to be sent as SMS and the other column to show a mobile icon based on the SMS flag value set. Then I thought of creating an agent which is scheduled for every 5 minutes and any calendar entries which fall in the 5 minutes provided that entry is set to be sent as SMS I want to call an external DLL function which sends the SMS.
The following is the code which I am using the to show the user the various entries from which the user selects
Sub Click(Source As Button)
Dim session As New notessession
Dim database As NotesDatabase
Dim uiws As New NotesUIWorkspace
Dim collection As NotesDocumentCollection
Dim noteCursorDoc As NotesDocument
Dim itemflag As NotesItem
Dim vc As NotesViewEntryCollection
Dim view As NotesView
Dim entry As NotesViewEntry
Dim text As String
Set database = Session.CurrentDatabase
Set view = database.GetView("($SMSRemainders)")
Set noteCursorDoc = database.CreateDocument
Set vc = view.AllEntries
Set entry = vc.GetFirstEntry
Set database = session.CurrentDatabase
Set collection = uiws.Picklistcollection(PICKLIST_CUSTOM, True, database.server, database.filepath, "($SMSRemainders)", "SMS Reminders", " ")
If collection.count > 0 Then
Set noteCursorDoc = collection.GetFirstDocument
Set item = noteCursorDoc.GetFirstItem("Description")
For i = 1 To collection.Count
Set itemFlag = New NotesItem(noteCursorDoc, "txtSmsFlag", "")
Set noteCursorDoc = collection.GetNextDocument(noteCursorDoc)
Issuses where I am stuck:
#1: I am not able to set a flag value for any of the calendar entries which he has selected.
Due to this I am not able to distinguish between the calendar entries which are set for SMS and the existing calendar entries. If someone would give the best optimized solution or some workaround I will the happiest one... This is my module to be completed... I cannot let my self down. Please help.
Please this is very urgent
Thanks in advance...