Creating alarm

I have created an application using calendar. This application is to keep track the date of traning conducted in our company. I need to create an alarm to alert the user of incoming training. For example if the training is scheduled to be on 30 November, then the alarm will apear one day before the training.

Can anyone advise me how to create this alarm from this application.

Thanks in advance.

Subject: Creating alarm

Have you searched the forum for the word “reminder”?

Look in the SandBox for the word ‘reminder’, there is an example,

JYR

Subject: RE: Creating alarm

Thanks JVR for the quick response. I have found a code in the sandbox as recommended by you. Just need to confirm the coding…

Sub createReminder( dateTime As notesDateTime, popUpStr As String, subjectStr As String )

Dim sess As New NotesSession

Dim userMailDb As New NotesDatabase( “”, “” )

Call userMailDb.OpenMail

Dim reminderDoc As New NotesDocument( userMailDb )

Dim DTItem As NotesItem

With reminderDoc

.Form = "Appointment"

.ReplaceItemValue "$Alarm", 1

.ReplaceItemValue "$AlarmDescription", popUpStr

.ReplaceItemValue "$AlarmMemoOptions", ""

.ReplaceItemValue "$AlarmOffset", 0

.ReplaceItemValue "$AlarmUnit", "M"



.Subject = subjectStr

.Alarms = "1"



.CalendarDateTime = dateTime.lsLocalTime

.StartDate = dateTime.lsLocaltime

.StartTime = dateTime.lsLocaltime

.StartDateTime = dateTime.lsLocaltime



.EndDate = dateTime.lsLocaltime

.EndTime = dateTime.lsLocaltime

.EndDateTime = dateTime.lsLocaltime



.AppointmentType = 4



.ComputeWithForm False, False

.Save True, False



.PutInFolder( "$Alarms" )

End With

End Sub

Question 1 - Where do we create the coding?

Question 2 - Do we need to create new form in the application?

Question 3 - How abt the fields such as $Alarm, dateTime.ISlocaltime, appointmenttype etc, do we need to create a new fields in the new form in the application?

Appreciate if you could advise me on how to create the coding as i’m new in developing the notes application.

Thank You in advance.

Subject: RE: Creating alarm

Question 1 - Where do we create the coding? In the application your développing

Just call the SUB with your parameters

Call createReminder( YouReminderDate, “Test”, " a subject" )

Question 2 - Do we need to create new form in the application?

No, it will be created in the user mail file with:

Dim userMailDb As New NotesDatabase( “”, “” )

Call userMailDb.OpenMail

Question 3 - How abt the fields such as $Alarm, dateTime.ISlocaltime, appointmenttype etc, do we need to create a new fields in the new form in the application?

No

Subject: RE: Creating alarm

Dear JeanYves Riverin,

Thank you very much.

The coding and formula works.

Thanks again.