How can I have an agent update busytime.nsf? I am creating calendar events for training on peoples calendars via this agent. But it is not marking busytime as well.
Subject: RE: Busytime
You have to make sure the items you’re adding with your code are the same items, values and types as a document you create manually. See this, for example: http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/f1622d6cf7eb3c4085256f5e004991c6?OpenDocument
Subject: update by an agent
Dim s As New NotesSession Call s.SendConsoleCommand(s.CurrentDatabase.server,"tell sched validate")
Subject: Busytime
I haven’t tried this… but you should be able to add a program document with ‘nsched.exe’ and then use validate as the command line. This should be the equivalent of Tell Sched Validate. You can then set various times.
Subject: RE: Busytime
First of all, thanks for responding. But I don’t know to what you are referring to. Can you give me more detail of what you are describing?
Subject: RE: Busytime
I’m not sure if there’s a better way than what Jay is suggesting, but since you want to validate busytime.nsf from code instead of on a schedule, you can try putting these two together:
Subject: RE: Busytime
OK. I think I see what you guys are referring to. But here is the thing. The normal meetings and such are being added to busytime to show someone is busy.
I am creating the calendar events programattically, here is the code I am generating. It blocks out that time on my calendar, but when someone schedules a meeting, it isn’t showing me as busy, and allowing meetings to be scheduled when I am gone. Those tasks that you are showing, are already running aren’t they? For the normal calendar events? I figure those get kicked off on the save and send portion of a calendar event. But like I said, this is created on the back end. Even if I ran this scheduler piece again, it wouldn’t pick up these would they?
I am hoping there is someone out there who has created calendar entries on the fly and got them to show up as busytime.
Here is the process that I am doing. I person requests training for a week. The manager approves it. Since the manager doesn’t have editor+ rights to his database, I have an agent signed by me that sees what is approved and adds a ‘all day event’ in his calendar.
Here is the code. I thought I might have just been missing a flag, but I guess that isn’t right:
maildoc.~$Alarm = 1
maildoc.~$AlarmOffset = -1440
maildoc.~$LangPrincipal = ""
maildoc.~$AltPrincipal = s.UserName
maildoc.~$BusyName = doc.Originator(0)
maildoc.~$BusyPriority = "1"
maildoc.~$CSVersion = 2
maildoc.~$PublicAccess="1"
maildoc.~$UpdatedBy = doc.Originator(0)
maildoc.~$SMTPKeepNotesItems = 1
maildoc.~$HFFlags = 1
maildoc.~$ExpandGroups =3
maildoc.Logo= "StdNotesLtr39"
maildoc.SaveOptions= ""
maildoc.MailOptions=""
maildoc.~$FromPreferredLanguage = "en-US"
maildoc.OnlinePlace = ""
maildoc.~$LangChair =""
maildoc.Alarms =1
maildoc.OrgConfidential = ""
maildoc.StartTimeZone = "Z=5$DO=0$ZX=66$ZN=US Eastern"
maildoc.EndTimeZone = "Z=5$DO=0$ZX=66$ZN=US Eastern"
maildoc.Repeats = ""
maildoc.OrganizerInclude = ""
maildoc.Location = ""
maildoc.RoomToReserve =""
maildoc.Resources = ""
maildoc.OnlineMeeting=""
maildoc.Presenters = ""
maildoc.OnlinePlaceToReserve = ""
maildoc.AudioVideoFlags = ""
maildoc.SendAttachments = ""
maildoc.SchedulerSwitcher = 1
maildoc.~$BorderColor = "D2DCDC"
maildoc.BookFreeTime = ""
maildoc.EnterSendTo = ""
maildoc.EnterCopyTo = ""
maildoc.EnterBlindCopyTo = ""
maildoc.Notes = ""
maildoc.Alarms =""
maildoc.ExcludeFromView = "D"
maildoc.SequenceNum = 1
maildoc.UpdateSeq = 1
maildoc.AltChair = doc.Originator(0)
maildoc.WebDateTimeInit = 1
maildoc.ApptUNID = doc.UniversalID
maildoc.Categories = doc.ReqType
maildoc.Chair = doc.Originator
maildoc.MeetingType = 1
maildoc.Principal = doc.Originator
maildoc.~_viewicon = 139
maildoc.Subject = "Time-Off Request: "+ doc.ReqType(0)
maildoc.Form = "Appointment"
maildoc.AppointmentType = strAppointmentType
Subject: Like Andre said, check your data types
Some of your items’ data types are wrong. I’m not sure if this is enough to address your schedule validation issue, but it’s obviously important anyway.
For example, while $Alarm should be numeric as you have it, $CSVersion should be text.
Subject: RE: Like Andre said, check your data types
Thanks. I did create a ‘real’ calendar event, and checked the data types there. I guess I might have messed some up.