I get the following error message;
Id is malformed.
CD0000008B9511D182D800C04FB1625DBA75FAB1A56555459257CE195FAEBE39
The ID comes from a table where I saved the ID when I created the reminder in the calendar.
CF9 and Exchange 2013:
<cfobject type="Java" class="microsoft.exchange.webservices.data.Appointment" name="appointment">
<cfobject type="Java" class="microsoft.exchange.webservices.data.AppointmentSchema" name="appointmentschema">
<cfset appointment.init( service )>
<cfobject type="Java" class="microsoft.exchange.webservices.data.PropertySet" name="propertyset">
<cfset propertyset.init()>
<cfobject type="Java" class="microsoft.exchange.webservices.data.ItemId" name="thisitemid">
<cfset thisitemid.init("#arguments.ExchangeID#")>
<cfset appointment = appointment.Bind(service, thisitemid) />
<cfscript>
appointment.setStart(#StartDate#);
appointment.setEnd(#EndDate#);
appointment.setSubject("#Arguments.EventName#");
appointment.setBody(MessageBody.getMessageBodyFromText("#Arguments.EventDescription#"));
appointment.Update(ConflictResolutionMode.AlwaysOverwrite);
</cfscript>
Edit: The following code is what I use today to create an appointment. However, I haven't figured out how to return the correct "ID" of the appointment so I can save it in case the appointment needs to be deleted or updated.
<cfobject type="Java" class="microsoft.exchange.webservices.data.ExchangeService" name="service">
<cfset service.init()>
<cfobject type="Java" class="microsoft.exchange.webservices.data.ExchangeVersion" name="version">
<cfset service.init(version.Exchange2010)>
<cfobject type="Java" class="microsoft.exchange.webservices.data.WebCredentials" name="credentials">
<cfset credentials.init("#Arguments.EmailAddress#","#Arguments.Pword#")>
<cfset service.setCredentials(credentials) />
<cfobject type="Java" class="java.net.URI" name="uri">
<cfset uri.init("https://south.exch999.serverdata.net/EWS/Exchange.asmx?wsdl")>
<cfset service.setUrl(uri) />
<cfoutput>
<cfobject type="Java" class="microsoft.exchange.webservices.data.Appointment" name="appointment">
<cfset appointment.init( service )>
<cfobject type="Java" class="microsoft.exchange.webservices.data.MessageBody" name="MessageBody">
<cfscript>
appointment.setStart(#createDateTime(Year(Arguments.EventStartDateTime), Month(Arguments.EventStartDateTime),Day(Arguments.EventStartDateTime), evaluate(Hour(Arguments.EventStartDateTime)), Minute(Arguments.EventStartDateTime), 0)#);
appointment.setEnd(#createDateTime(Year(Arguments.EventEndDateTime), Month(Arguments.EventEndDateTime),Day(Arguments.EventEndDateTime), evaluate(Hour(Arguments.EventEndDateTime)), Minute(Arguments.EventEndDateTime), 0)#);
appointment.setSubject("#Arguments.EventName#"); appointment.setBody(MessageBody.getMessageBodyFromText("#Arguments.EventDescription#"));
appointment.Save();
TheEventID = appointment.Id.UniqueId;
</cfscript>
What property should I retrieve to save an ID that can be used to retrieve the appointment later?