Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

How to find all related appointments of a Appointment using EWS. Thread.Sleep gives required results.

$
0
0

I am creating a meeting in the rooms calender by a service account impersonating the rooms calender. Now there are 2 rooms, i create appointment in first rooms calender and add second room as a resource. I want appointmentid of firstrooms calender appointment as well as second rooms calender appointment. I am using invitation mode as   SendInvitationsMode.SendToAllAndSaveCopy

To save the appointment

Appointment.Save(new FolderId(WellKnownFolderName.Calendar, new Mailbox(PrimaryRoom.ExternalRoomID.Trim())), SendInvitationsMode.SendToAllAndSaveCopy);

To get the appointmentId for primary room:

 Appointment.Bind()

Now, is there a way that i can also get the second room appointment id. I am searching it using CalendarView however sometimes it returns it and sometime it doesnot. My understanding is that exchange takes some time to create the appointment in resource calender and does not return appointmentid immediately after querying it. If i use thread.sleep for some time, i get the appointment id. I dont want to use thread.sleep.

Can you please suggest a solution to this. 

Thanks and Regards

Rohit


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>