-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Description
I'm trying to create a new appointment in the calendar using the code below:
const appointment = new Appointment(exchangeService);
appointment.Subject = "test";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Free;
appointment.Save(SendInvitationsMode.SendToNone)
.then(res => console.log(res))
.catch(err => console.log(err.toString()));But I get the following error:
SoapFaultDetails {
message: 'The request is invalid.',
InnerException: null,
faultCode: 'a:ErrorInvalidRequest',
faultString:
{ 'xml:lang': 'de-DE', faultstring: 'The request is invalid.' },
faultActor: null,
responseCode: 214,
errorCode: 0,
exceptionType: null,
lineNumber: 0,
positionWithinLine: 0,
errorDetails:
DictionaryWithStringKey { keys: [], keysToObjs: {}, objects: {}, keyPicker: [Function] },
HttpStatusCode: 500 }Exception: The request is invalid.
at Function.SoapFaultDetails.Parse (/Users/wlchs/git/swofi-appointments/be_src/node_modules/ews-javascript-api/js/Misc/SoapFaultDetails.js:230:32)
at CreateItemRequest.ServiceRequestBase.ReadSoapFault (/Users/wlchs/git/swofi-appointments/be_src/node_modules/ews-javascript-api/js/Core/Requests/ServiceRequestBase.js:340:72)
at CreateItemRequest.ServiceRequestBase.ProcessWebException (/Users/wlchs/git/swofi-appointments/be_src/node_modules/ews-javascript-api/js/Core/Requests/ServiceRequestBase.js:263:41)
at /Users/wlchs/git/swofi-appointments/be_src/node_modules/ews-javascript-api/js/Core/Requests/SimpleServiceRequestBase.js:80:41
at tryCatcher (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/promise.js:690:18)
at _drainQueueStep (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/wlchs/git/swofi-appointments/be_src/node_modules/bluebird/js/release/async.js:17:14)
at processImmediate (timers.js:632:19)
at process.topLevelDomainCallback (domain.js:120:23)However, if I remove the appointment.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Free; part, everything works fine.