function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ume HaaniUme Haani 

How to query for Event free/busy information ?

I have a requirement to search for user free/busy interval by looking into his calendar (Event). I am using java Rest Api as my environment. 
Navee RahulNavee Rahul
Hi Ume,

u can use below query.

Select id,name,(Select Id,RelationId,Relation.Type,EventId,Status,Relation.Name,Event.subject,Event.owner.Name,Event.what.Name,Event.who.Name,Event.ShowAs,Event.StartDateTime,Event.EndDateTime,Event.ActivityDate,Event.ActivityDateTime From EventRelations )from User where id=:UserID

Actually the above query will say whether an event is busy or free .
Event.ShowAs  this field will say its busy or free or out of office status.

where you can add Start time and End time in the above query for more accurate precise output for time interval.

Thanks
D Naveen Rahul.
Ume HaaniUme Haani
Thanks for reply,
I actually want to get free intervals of user when i send start time and end time interval in the query.