Setting alarms - $alarm folder

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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


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 ;-)

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.
jdembareAuthor Commented:
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.

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

jdembareAuthor Commented:
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?
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdembareAuthor Commented:
Genius ~Hemanth, worked like a charm. Offset not really necessary but the cdat did the trick. Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.