Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: How can I add a required attendee?
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application Development
Platform: Windows
Release: 8.5.3
Reproducible: Always

I have a simple java code. it will generate a meeting on my mailbox. But when I open the meeting in Notes, the sendTo and RequiredAttendee fields are cleaned automatically.

My JAVA is 32bit, version 1.7,My Notes and Domino are all 8.5.3,I am using NCSO.jar

Code:

public void createEvent( CalendarEvent event) throws Exception{

Document doc = db.createDocument();
String docId = doc.getUniversalID();
Logger.log("docId = "+ docId);


doc.replaceItemValue("Form", "Appointment");
doc.replaceItemValue("ApptUNID", docId);

if(event.getInvitees().getAttendeesList().size()>0){
doc.replaceItemValue("AppointmentType", "3"); // Meeting = 3
doc.replaceItemValue("Principal", session.getUserName());
doc.replaceItemValue("Chair", session.getUserName());
}else{
doc.replaceItemValue("AppointmentType", "0"); // Appointment = 0
}

doc.replaceItemValue("Subject", event.getSubject());
doc.replaceItemValue("Body", event.getDescription());

Calendar start = Calendar.getInstance();
start.setTime(event.getStartTime());

Calendar end = Calendar.getInstance();
end.setTime(event.getEndTime());

DateTime startTime = session.createDateTime(start);
DateTime endTime = session.createDateTime(end);

Logger.log("Local time = " + startTime.getLocalTime());

doc.appendItemValue("CalendarDateTime",startTime) ;
doc.replaceItemValue("StartDate", startTime);
doc.replaceItemValue("StartTime", startTime);
doc.appendItemValue("StartDateTime",startTime) ;

doc.replaceItemValue("EndDate", endTime);
doc.replaceItemValue("EndTime", endTime);
doc.appendItemValue("EndDateTime",endTime) ;

doc.replaceItemValue("From", session.getUserName());


doc.replaceItemValue("Location", event.getLocation());


for(Actor invitee : event.getInvitees().getAttendeesList()){

Logger.log("attendee = "+ invitee.getEmailAddress());

// TODO how to set name
doc.appendItemValue("RequiredAttendees", invitee.getEmailAddress());

doc.appendItemValue("SendTo", invitee.getEmailAddress());

doc.appendItemValue("EnterSendTo", invitee.getEmailAddress());

}

doc.computeWithForm(true, false);
doc.save(true,false,false);

}

Could anybody do me a favor to find what is wrong?


Feedback number WEBB962R66 created by ~Rex Frofanabergetsi on 03/22/2013

Status: Open
Comments:





Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS