The location field is either a custom string or info from a booked resource.
Remember that a resource is an associate of type 1 and that you should disregard the person_id.
When you book a resource, its appointment is linked to the person’s appointment using the mother_id field. There will be two distinct appointment IDs: one for the person and one for the resource!
List resources
Check if a resource is available
It is good practice to always check availability before booking a resource to avoid double booking.
Book a resource
By calling SetParticipants(), you can book the resource without the overhead of cloning and linking appointments. Here’s how:
- Create a new appointment for the person or retrieve an existing, uncompleted appointment.
- Create an NSParticipantInfo list and add the associate ID of the resource to it.
- Call
SetParticipants().
- Save the appointment.
The following example sets up a review meeting at 14:15-15:00 on the last day of the current month and reserves the meeting room with ID 37.