I started to work with Lotus Notes 8.5, and i have to create meetings in Lotus by using Java, lotus.domino and Notes.jar.
So, to do this, i create a new Document and fill it with all the needed fields (i think). This is how i create my meeting :
Document newDocument = db.createDocument();
newDocument.appendItemValue("Body", "Create meeting from java.");
newDocument.appendItemValue("Notes", "Test Notes");
newDocument.appendItemValue("Chair", "Me");
newDocument.appendItemValue("Principal", "Me");
newDocument.appendItemValue("$altPrincipal", "Me");
newDocument.appendItemValue("ExcludeFromView", "D,S");
newDocument.appendItemValue("UpdateSeq", 1);
newDocument.appendItemValue("$CSVersion", "2");
newDocument.appendItemValue("$SMTPKeepNotesItems", "1");
newDocument.appendItemValue("$CSWISL", "$S:1,$L:1,$B:1,$R:1,$E:1,$W:1,$O:1,$M:1,RequiredAttendees:1,INetRequiredNames:1,AltRequiredNames:1,StorageRequiredNames:1,OptionalAttendees:1,INetOptionalNames:1,AltOptionalNames:1,StorageOptionalNames:1,ApptUNIDURL:1,STUnyteConferenceURL:1,STUnyteConferenceID:1,SametimeType:1,WhiteBoardContent:1,STRoomName:1");
newDocument.appendItemValue("WebDateTimeInit", "1");
newDocument.appendItemValue("OrgTable", "C0");
newDocument.appendItemValue("$AlarmDisabled", "1");
newDocument.appendItemValue("$HFFlags", "1");
newDocument.appendItemValue("Form", "Appointment");
newDocument.appendItemValue("$FromPreferredLanguage", "fr");
newDocument.appendItemValue("ApptUNID", "267DEFCD6ADE4EF8C1257DF600464A1B642");
newDocument.appendItemValue("$LangChair", "");
newDocument.appendItemValue("AppointmentType", "3");
newDocument.appendItemValue("$TableSwitcher", "Description");
newDocument.appendItemValue("OnlineMeeting", "");
newDocument.appendItemValue("From", "Me");
newDocument.appendItemValue("AltChair", "Me");
newDocument.appendItemValue("OnlinePlace", "");
newDocument.appendItemValue("IsBroadcast", "");
newDocument.appendItemValue("$ExpandGroups", 3);
newDocument.appendItemValue("IsTeamCalendar", "");
newDocument.appendItemValue("Importance", "");
newDocument.appendItemValue("OrgConfidential", "");
newDocument.appendItemValue("Subject", "Meeting test from Java");
newDocument.appendItemValue("PreventCounter", "");
newDocument.appendItemValue("Location", "R1");
newDocument.appendItemValue("RoomToReserve", "");
newDocument.appendItemValue("Resources", "");
newDocument.appendItemValue("$PaperColor", 1);
newDocument.appendItemValue("STRecordMeeting", "");
newDocument.appendItemValue("WhiteBoardContent", "");
newDocument.appendItemValue("Categories", "");
newDocument.appendItemValue("$BorderColor", "7F96A3");
newDocument.appendItemValue("$WatchedItems", "$S,$L,$B,$R,$E,$W,$O,$M,RequiredAttendees,INetRequiredNames,AltRequiredNames,StorageRequiredNames,OptionalAttendees,INetOptionalNames,AltOptionalNames,StorageOptionalNames,ApptUNIDURL,STUnyteConferenceURL,STUnyteConferenceID,SametimeType,WhiteBoardContent,STRoomName");
newDocument.appendItemValue("CalForwardChairNotificationTo", "");
newDocument.appendItemValue("ReturnReceipt", "");
newDocument.appendItemValue("PreventDelegate", "");
newDocument.appendItemValue("EnterSendTo", "");
newDocument.appendItemValue("EnterCopyTo", "");
newDocument.appendItemValue("EnterBlindCopyTo", "");
newDocument.appendItemValue("ConferenceCallInfo", "");
newDocument.appendItemValue("SchedulerSwitcher", "1");
newDocument.appendItemValue("$Abstract", "");
newDocument.appendItemValue("StartTimeZone", "Z=-1$DO=1$DL=3 -1 1 10 -1 1$ZN=Western/Central Europe");
newDocument.appendItemValue("EndTimeZone", "Z=-1$DO=1$DL=3 -1 1 10 -1 1$ZN=Western/Central Europe");
newDocument.appendItemValue("NewStartTimeZone", "");
newDocument.appendItemValue("NewEndTimeZone", "");
newDocument.appendItemValue("Encrypt", "Représentation invalide. (undefined)");
newDocument.appendItemValue("Sign", "");
newDocument.appendItemValue("MeetingType", "");
newDocument.appendItemValue("$PublicAccess", "1");
newDocument.appendItemValue("StartDate", "27/02/2015");
newDocument.appendItemValue("StartTime", "11:00:00");
newDocument.appendItemValue("STARTDATETIME", s.createDateTime(new GregorianCalendar(2015, 02, 27, 11, 0, 0)));
newDocument.appendItemValue("EndDate", "27/02/2015");
newDocument.appendItemValue("EndTime", "13:00:00");
newDocument.appendItemValue("EndDateTime", s.createDateTime(new GregorianCalendar(2015, 02, 27, 13, 0, 0)));
newDocument.appendItemValue("CalendarDateTime", s.createDateTime(new GregorianCalendar(2015, 02, 27, 11, 0, 0)));
newDocument.appendItemValue("_ViewIcon", 158);
newDocument.appendItemValue("$ShowComments", "Normal");
newDocument.appendItemValue("$ShowDescription", "Show");
newDocument.appendItemValue("$BusyName", "Me");
newDocument.appendItemValue("$BusyPriority", "1");
newDocument.appendItemValue("SequenceNum", 2);
newDocument.appendItemValue("$CSTrack", "Imported from my contacts at 02/24/2015 14:00:17");
newDocument.appendItemValue("$NoPurge", s.createDateTime(new GregorianCalendar(2015, 02, 27, 13, 0, 0)));
newDocument.appendItemValue("$UpdatedBy", "Me");
newDocument.appendItemValue("$Revisions", s.createDateTime(new GregorianCalendar(2015, 02, 24, 13, 48, 31)));
newDocument.appendItemValue("tmpUseLongDate", s.createDateTime(new GregorianCalendar(2015, 02, 27, 11, 0, 0)));
newDocument.appendItemValue("tmpEventLabel", "Meeting from Java (tmpEventLabel)");
newDocument.appendItemValue("dispRepeatText", "Meeting from Java (dispRepeatText)");
newDocument.appendItemValue("tmpHideTimeZone", "");
newDocument.appendItemValue("tmpStartDate1", "27/02/2015");
newDocument.save();
When i came back to Lotus, the meeting is created and shown in the calendar. The problem is, whatever field i add or remove, when i click on this meeting, Lotus throw me an error, saying (approximate translation from french):
Field : 'tmpStartDate1' : Temporary data required for operator or @ function
So i add this new field in java, launch the program, create a meeting, and...
Field : 'tmpHideTimeZone' : Temporary data required for operator or @ function
For now, it is the 5th field Lotus asked me with this message....
All 'tmp******' fields are missing, but i don't know them. I thought those fields could be generated by Lotus, because of the 'tmp', but how ?
I compare with other meetings created with Lotus Notes, and there are no such 'tmp' fields.
Any ideas ?
EDIT :
I tried this :
newDocument.computeWithForm(true, true);
It throws a NotesException if your document isn't in a good format. When i execute my code (approximate translation again...) :
NotesException: Incorrect data type in the field.
I tried computeWithForm
in another program where I create and add a contact to Lotus, and i didn't get any errors.
So indeed, there is a problem with meeting's fields...
EDIT :
Any new ideas ? I am a bit confused about how to develop on this software....
tmp***********
fields. Thx for help though. – Quentin Beuvelet