Setting alarms - $alarm folder

Posted on 2004-10-22
Last Modified: 2013-12-18
I want to implement a functionality for setting reminders/alerts in an application. So what I am theoretically I thinking of asking the user the usual questions, when to kick off the alarm, whether send an email etc within the application. I then, through code, create an alert and place it in the $alarms folder of that user's mailfile.  So I tried a simple test setting all the special alarm fields and putting in the $alarms folder. If I open the $alarms folder, I can see the alert entry. Problem is it's not kicking off and I am not sure wat I am missing. If set an alert via the usual calendar approach or the "Follow Up" functionality in 6.5, I can see the entry and it does get kicked off. What am I missing? Parts of my code are below and it's a simple test  code:


dim note as notesdocument
Dim SDT As NotesDateTime
Dim EDT As NotesDateTime
< set objects here datetimes, dbs etc>
note.~$Alarm = 1
note.~$AlarmDescription = "Need to followup on the meeting!!!"
note.~$AlarmUnit = "M"
note.~$AlarmTime = SDT.DateOnly & " " & SDT.TimeOnly
note.~$AlarmOffSet = 0

note.StartTimeZone = SDT.TimeZone
note.CalendarDateTime = SDT.DateOnly & " " & SDT.TimeOnly
note.StartDate = SDT.DateOnly
note.StartTime = SDT.TimeOnly
note.StartDateTime = SDT.DateOnly & " " & SDT.TimeOnly
note.EndDate = EDT.DateOnly
note.EndTime = EDT.TimeOnly
note.EndDateTime = EDT.DateOnly & " " & EDT.TimeOnly
note.EndTimeZone = EDT.TimeZone
note.Alarms = "1"
Call note.Save(True,False)
Call note.PutInFolder("($Alarms)")

Does the datetime formats and/or timezones critical here? Or perhaps what is the deamon that Notes run to process these entries in the $alarms folder? Can one checkout this deamon/agent?

This is important and somewhat urgent but only prob is I only got so much points.
Question by:jdembare
    LVL 24

    Expert Comment


    Set the form to Appointment and invoke computewithform method to recalculate other fields too so that you don't have to fill whole form using the script...

    I have seen that alarms doesn't honor the script generated docs.. why that far...they don't even work very well with repeat meetings ;-)

    LVL 31

    Expert Comment

    The daemon is naldaemn.exe.  If this particular user can get standard alarms displayed but not yours, then it is your document that is the problem.  It is undocumented precisely how the alarm daemon decides what is a valid alarm, and what documentation there is does not necessarily hold true.  You realy have to experiement with the fields.

    Author Comment

    Thanks guys, will try out ~Hemanth's idea. I did try it though before using the "Appointment" form only difference is that I didn't call computewithform to recalculate other fields. Maybe that might make a difference.


    Author Comment

    Calling computewithform is return a false flag i.e it's not successfully computing. Im now not sure wat fields to set before calling computewithform. Any ideas?
    LVL 24

    Accepted Solution

    Your CalendarDateTime is causing this error.. Try this

    note.CalendarDateTime = CDat(SDT.DateOnly & " " & SDT.TimeOnly)

    And set the Alarmoffset to 10 minutes before the event...

    note.~$AlarmOffSet = -10

    And now use computewithform.. and your alarm should be recognized

    Author Comment

    Genius ~Hemanth, worked like a charm. Offset not really necessary but the cdat did the trick. Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: JavaScript Coding - Massive 12-Part Bundle

    Regardless of your programming skill level, you'll go from basics to advanced concepts in a vast array of JavaScript subjects including Sammy.js, Agility.js, Ember.js, Node.js, jQuery, AJAX, Extjs, AngularJS, Knockout.js, and JSON.

    Suggested Solutions

    This is an old article, please see an updated version of this article, located here:
    IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
    In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now