Well I am trying to create an appointment in another user’s mail file whose delegation rights I am having. Most of the things are working fine but not all, [:-)]
Problem which I am facing is what values I pass in to following fileds:
String username = s.getUserName();
doc.replaceItemValue(“Chair”, username);
doc.replaceItemValue(“Principal”, username);
If I supply the name of my current user then it appears like meeting, and if I pass the name of user who owns mail file then it worked fine (I tried by hard coding these values.)
Can anyone tell how can I get the name of the user who owns file. As I am logged in using the user account who is having delegated rights on this, so I dont know any mechanism to find out the name of user. I am using java-corba classes for creating appoitment.
I hope problem is clear to you. If require any clearification then plz let me know…
Subject: Creating appointment in another user’s mail file…
Hello Will,
I found this one in my snippet db. Even if it’s not working correctly, I thnik it’ll be helpful.
idp
Dim ui As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim appt As NotesDocument
Dim start As NotesDateTime
Dim enddt As NotesDateTime
Set start = s.CreateDateTime("23.02.2006 04:00:00")
Set enddt = s.CreateDateTime("23.02.2006 20:00:00")
Const server = "notes-app-mail"
Const mailfile = "mailfile.nsf"
Set db = s.GetDatabase(server, mailfile, False)
Set appt = db.CreateDocument
appt.Form = "Appointment"
appt.Chair = "CN=Mike Dynamic/O=deltaalpha"
appt.AltChair = "CN=Mike Dynamic/O=deltaalpha"
appt.Principal = "CN=Mike Dynamic/O=deltaalpha"
appt.SendTo = "CN=Mike Dynamic/O=deltaalpha"
appt.Subject = "Project Kickoff
appt.AppendStartTime = start
Set appt.AppendEndTime = enddt
Set appt.EndDateTime = enddt
Set appt.CalendarDateTime = start
Set appt.StartDateTime = start
appt.AppointmentType = "2"
appt.MeetingType = "1"
appt.Categories = "V"
Call appt.AppendItemValue("ExcludeFromView", "D")
Call appt.AppendItemValue("ExcludeFromView", "S")
Call appt.ComputeWithForm(True, False)
Call appt.Save(True, False)
Subject: RE: Creating appointment in another user’s mail file…
Hi Munish,
Thanks for your response.
I tried that but getting following exception:
NotesException: Notes error: You are not authorized to perform that operation (CalenderProfile)
at lotus.domino.NotesExceptionHelper.read(Unknown Source)
at lotus.domino.NotesExceptionHolder._read(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at lotus.domino.corba._IDatabaseStub.getProfileDocument(Unknown Source)
at lotus.domino.cso.Database.getProfileDocument(Unknown Source)
at Test.main(Test.java:77)
Subject: Creating appointment in another user’s mail file…
Hello Will,
I found this one in my snippet db. Even if it’s not working correctly, I thnik it’ll be helpful.
idp
Dim ui As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim appt As NotesDocument
Dim start As NotesDateTime
Dim enddt As NotesDateTime
Set start = s.CreateDateTime("23.02.2006 04:00:00")
Set enddt = s.CreateDateTime("23.02.2006 20:00:00")
Const server = "notes-app-mail"
Const mailfile = "mailfile.nsf"
Set db = s.GetDatabase(server, mailfile, False)
Set appt = db.CreateDocument
appt.Form = "Appointment"
appt.Chair = "CN=Mike Dynamic/O=deltaalpha"
appt.AltChair = "CN=Mike Dynamic/O=deltaalpha"
appt.Principal = "CN=Mike Dynamic/O=deltaalpha"
appt.SendTo = "CN=Mike Dynamic/O=deltaalpha"
appt.Subject = "Project Kickoff
appt.AppendStartTime = start
Set appt.AppendEndTime = enddt
Set appt.EndDateTime = enddt
Set appt.CalendarDateTime = start
Set appt.StartDateTime = start
appt.AppointmentType = "2"
appt.MeetingType = "1"
appt.Categories = "V"
Call appt.AppendItemValue("ExcludeFromView", "D")
Call appt.AppendItemValue("ExcludeFromView", "S")
Call appt.ComputeWithForm(True, False)
Call appt.Save(True, False)