I’m using a form in a call logging db I’ve created from which the person logging the call can book an Appointment into his/her calendar. Now I would like to make some changes, so the person logging the call could select a person (person X) in a dialog list field and create the Appointment into the calendar of person X.I’ve tried a couple of things, but get stuck everytime. This is the code I use to create the appointment into their own calendar. What needs to be changed to log into person X’s calendar?
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As New NotesDatabase ("","")
Dim ws As New NotesUIWorkspace
Dim thisUIdoc As NotesUIDocument
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim userName As New notesname(session.username)
Dim dbfilename As String
Dim dbserver As String
Dim value As Integer
Call db.OpenMail
dbfilename=db.filepath
dbserver = db.server
Set thisUIdoc = ws.CurrentDocument
subject1 = thisUIdoc.FieldGetText("bookingtype")
subject2 = thisUIdoc.FieldGetText("bookingstatus")
subject3 = thisUIdoc.FieldGetText("Serial")
subject4 = thisUIdoc.FieldGetText("Customer")
location1 = thisUIdoc.FieldGetText("Customer")
location2 = thisUIdoc.FieldGetText("Name")
location3 = thisUIdoc.FieldGetText("Address")
location4 = thisUIdoc.FieldGetText("City")
location5 = thisUIdoc.FieldGetText("Country")
todaydate = thisUIdoc.FieldGetText("Now")
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldClear("AppointmentType")
Call uidoc.FieldSetText("AppointmentType","0")
Call uidoc.Refresh
Call uidoc.FieldSetText("Subject",subject1 + " -- " + subject2+ " -- " +subject3+ " -- " +subject4)
Call uidoc.FieldSetText("Location",location1+ ", " + location2 +" -- " +location3+ " -- " +location4+ " -- " +location5)
Call uidoc.FieldsetText("StartTime","08:00:00 AM")
Call uidoc.FieldsetText("EndTime","06:00:00 PM")
Call uidoc.FieldsetText("StartDate",todaydate)
Call uidoc.FieldsetText("EndDate",todaydate)
End Sub